Database Language -
A DBMS has appropriate languages and interfaces to express database queries and updates. Database languages can be used to read, store and update the data in the database.
Types of Database Language -
1. Database Definition Language (DDL):-
DDL stands for Data Definition Language. It is used to define database structure or pattern. It is used for creating tables, schema, indexes, constraints etc. in database. operations that we can perform on the database using DDL:
-> Create: It is used to create objects in the database.
-> Alter: It is used to alter the structure of the database.
-> Drop: It is used to delete objects from the database.
-> Truncate: It is used to remove all records from a table.
-> Rename: It is used to rename an object.
-> Comment: It is used to comment on the data dictionary.
All of these commands used to update the database schema that’s why they come under DDL.
2. Data Manipulation Language (DML):-
-> DML stands for Data Manipulation Language. It allows users to insert, update, delete and retrieve data from the database. the part of DML that involves data retrieval is called a query language.
-> DML is used for accessing and manipulating data in a database.
Operations come under DML:-
-> To retrieve data from table – Select
-> To insert records into the table – Insert
-> Update the data in tables – Update
-> Delete all the records from the table – Delete
-> It controls concurrency - Lock Table
3. Data Control Language (DCL):-
DCL is used for granting and revoking user access on a database. It is used to retrieve the stored or saved data -
-> To grant access to user - GRANT
-> To revoke access from user - REVOKE
There are the following operations which have the authorization of Revoke:
CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.
4. Transaction Control Language:-
The changes in the database that we made using DML commands are either performed or rollbacked using TCL.
-> Commit - It is used to save the transaction on the database.
-> Rollback - To rollback the changes made to the database.
A DBMS has appropriate languages and interfaces to express database queries and updates. Database languages can be used to read, store and update the data in the database.
Types of Database Language -
1. Database Definition Language (DDL):-
DDL stands for Data Definition Language. It is used to define database structure or pattern. It is used for creating tables, schema, indexes, constraints etc. in database. operations that we can perform on the database using DDL:
-> Create: It is used to create objects in the database.
-> Alter: It is used to alter the structure of the database.
-> Drop: It is used to delete objects from the database.
-> Truncate: It is used to remove all records from a table.
-> Rename: It is used to rename an object.
-> Comment: It is used to comment on the data dictionary.
All of these commands used to update the database schema that’s why they come under DDL.
2. Data Manipulation Language (DML):-
-> DML stands for Data Manipulation Language. It allows users to insert, update, delete and retrieve data from the database. the part of DML that involves data retrieval is called a query language.
-> DML is used for accessing and manipulating data in a database.
Operations come under DML:-
-> To retrieve data from table – Select
-> To insert records into the table – Insert
-> Update the data in tables – Update
-> Delete all the records from the table – Delete
-> It controls concurrency - Lock Table
3. Data Control Language (DCL):-
-> To grant access to user - GRANT
-> To revoke access from user - REVOKE
There are the following operations which have the authorization of Revoke:
CONNECT, INSERT, USAGE, EXECUTE, DELETE, UPDATE and SELECT.
4. Transaction Control Language:-
The changes in the database that we made using DML commands are either performed or rollbacked using TCL.
-> Commit - It is used to save the transaction on the database.
-> Rollback - To rollback the changes made to the database.