What are three sub-languages SQL consists of?

SQL is Structured Query Language used for relational database management. Originally based upon relational algebra and tuple relational calculus, SQL consists of a data definition language, data manipulation language, and a data control language. Read basic definition of SQL here.

Data Manipulation Language

The Data Manipulation Language (DML) contains the subset of SQL commands used most frequently – those that simply manipulate the contents of a database in some form. The four most common DML commands are used to retrieve information from a database (the SELECT) command, add new information to a database (the INSERT command), modify information currently stored in a database (the UPDATE command) and remove information from a database (the DELETE command).

Data Definition Language

The Data Definition Language (DDL) contains commands that are less frequently used. DDL commands modify the actual structure of a database, rather than the database’s contents. Examples of commonly used DDL commands include those used to generate anew database table (CREATE TABLE), modify the structure of a database table (ALTER TABLE), and delete a database table (DROP TABLE).

Data Control Language

The Data Control Language (DCL) is used to manage user access to databases. It consists of two commands: the GRANT command, used to add database permissions for a user, and the REVOKE command, used to take away existing permissions. These two commands form the core of the relational database security model.

Short answer

  • SQL consists of a data definition language, data manipulation language, and a data control language.

Similar articles

Comments