Software Testing Learning Hub

What is Data Definition Language, Date Manipulation Language and Data Control Language ?

there are Large variety of SQL commands and these commands divided into three basic groups as per the use of the commands, Data Definition Language, Date Manipulation Language and Data Control Language.

Data Definition Language or Data description language deals with database schema and descriptions of how the data should reside in the database, therefore language statements like CREATE TABLE or ALTER TABLE belong to DDL.

Some of commands which belongs to DDL

  • CREATE – to create objects in the database
  • ALTER – alters the Schema of the database
  • DROP – delete objects from the database
  • COMMENT – add the comments
  • RENAME – rename the object

Date Manipulation Language deals with data manipulation, and therefore includes most common SQL statements such SELECT, INSERT, etc.

Some of commands which belongs to DML

  • SELECT – retrieve data from database
  • INSERT – insert data or row into a database table
  • UPDATE – updates existing data within a table
  • DELETE – deletes all records from a table

Data Control Language includes commands such as GRANT, and mostly concerns with rights, permissions and other controls of the database system.

Some of commands which belongs to DCL

  • GRANT – grant permissions to the user for certain database
  • REVOKE – withdraw access privileges  that are given to the User