Database languages are used for read, update and store data in a database. There are several such languages that can be used for this purpose; one of them is SQL (Structured Query Language).
Types of DBMS languages:
Data Definition Language (DDL): DDL is used for specifying the database schema. Let’s take SQL for instance to categorize the statements that comes under DDL.
- To create the database instance – CREATE
- To alter the structure of database – ALTER
- To drop database instances – DROP
- To delete tables in a database instance – TRUNCATE
- To rename database instances – RENAME
All these commands specify or update the database schema that’s why they come under Data Definition language.
Data Manipulation Language (DML): DML is used for accessing and manipulating data in a database.
- To read records from table(s) – SELECT
- To insert record(s) into the table(s) – INSERT
- Update the data in table(s) – UPDATE
- Delete all the records from the table – DELETE
Data Control language (DCL): DCL is used for granting and revoking user access on a database –
- To grant access to user – GRANT
- To revoke access from user – REVOKE
In practical data definition language, data manipulation language and data control languages are not separate language; rather they are the parts of a single database language such as SQL.