DBMS languages are the set of statements that help users to store, retrieve, and update the data in the database systems.
Following are the four types of DBMS languages:
- Data Definition Language (DDL)
- Data Manipulation Languages (DML)
- Data Control Language (DCL)
- Transaction Control Language (TCL)
Data Definition Language (DDL)
DDL is a type of DBMS language, which defines the structure or schema of the database. This language allows the users to create tables, constraints, indexes, schemas, etc. in the database. This type of language also stores the information of metadata like the number and name of tables, schemas, constraints, and the columns of each table.
Following are the six operations which come under the Data Definition Language:
Create
It is the first operation of Data Definition Language, which helps users to create the instances or objects in the database.
Alter
It is the second operation of Data Definition Language, which changes the structure of the database.
Drop
It is the third operation of Data Definition Language, which deletes, removes, or drops the objects or instances from the database system.
Truncate
It is the fourth operation of Data Definition Language, which removes or deletes all the records or data (all rows and columns) from the database tables.
Rename
It is the fifth operation of Data Definition Language, which helps users or DBA to rename the objects of the database.
Comment
It is the sixth operation of Data Definition Language, which allows users to create comments on their database tables.
Data Manipulation Language (DML)
DML is a type of DBMS language, which accesses and manipulates the data in the database. This language allows users to insert the data into the database, update the existing data in the database, and access the record from the database tables.
Following are the four operations which come under the Data Manipulation Language:
Select
It is the first operation of data manipulation Language, which allows users to access the data from the database.
Insert
It is the second operation of data manipulation Language, which helps users to enter the data in the database.
Update
It is the third operation of data manipulation Language, which allows users to modify the existing data in the database.
Delete
It is the fourth operation of data manipulation Language, which removes or deletes the specified records from the database tables.
Data Manipulation Language is further divided into two types:
1. Procedural DML
2. Non-Procedural DML
Procedural DML
Procedural DML is a type of DML, which specifies what type of data is required and how to get that data.
Non-Procedural DML
Non-Procedural DML is also known as Declarative DML. It is another type of DML, which specifies only what type of data is required.
Data Control Language (DCL)
DCL is a type of DBMS language, which grants or revokes the user access on the database. This language basically controls the privileges in the database. To perform the operations of DDL and DML, we need the two privileges.
Following are the two operations or privileges which come under the Data Control Language:
Grant
It is an operation of DCL, which allows privileges to the user to perform their specific tasks on the database.
Revoke
It is another operation of DCL, which takes back the permissions which are previously granted to the user.
Transaction Control Language (TCL)
TCL is a type of DBMS language, which manages the transaction in the database. This language manages the changes which are done by the DML operations or commands.
Following are the two operations which come under the Transaction Control Language:
It is an operation of Transaction Control Language, which saves the transactions in the database.
Rollback
It is another operation of Transaction Control Language, which restores the database to the last committed state.