When we talk about databases. One of the biggest types that exists is SQL. SQL or Structured Query Language is used where you have to keep data that is relational in nature. Mysql, Postgres, DB2 are the different software that implements it. SQL comprises of many sub-languages that provide different capabilities to SQL. The capabilities that are provided by sub-languages of SQL are creation, manipulation of data, querying and control on it.
Now when we talk about different types of sub-languages that are supported by SQL, people generally know about DDL(Data Definition Language) and DML(Data Manipulation Language). In this article, we will talk about other types of sub-languages in SQL and what commands they provide to work with SQL.
DML (Data Manipulation Language):
In DML, we try to manipulate the data. Commands like INSERT and UPDATE are part of this sub-language.
DDL (Data Definition Language):
In DDL, we define the data structure and relation between them. Commands like CREATE are part of this.
DCL (Data Control Language):
In DCL, we control access to data. This is used for permission management and who can access the data. Commands like GRANT and REVOKE are part of this sub-language.
TCL (Transaction Control Language):
In TCL we control the flow in a transaction. COMMIT and ROLLBACK are part of this sub language.
DQL (Data Query Language):
In DQL, we query the data. SELECT command is part of DQL.
Below is the table of commands that exist in these sub-languages.
These were the sub-languages of SQL and what commands are part of which sub-language.