SQL, DML, DDL & DCL | Database Management System

SQL, DML, DDL & DCL | Database Management System

 

SQL commands can be divided into three parts: The Data Manipulation Language (DML) the Data Definition Language (DDL) and the Data control Language (DCL).
The data retrieval (query) and update commands form the DML part of SQL:

  • SELECT – extracts data from a database
  • UPDATE – updates data in a database
  • DELETE – deletes data from a database
  • INSERT INTO-inserts new data into a database

The DDL part of SQL permits database tables to be created or deleted. It also define indexes (keys), specify links between tables, and impose constraints between tables. The most important DDL statements in SQL are:

  • CREATE DATABASE – Creates a new database
  • ALTER DATABASE – modifies a database
  • CREATE TABLE – Creates a new table
  • ALTER TABLE – modifies a table
  • DROP TABLE – deletes a table
  • CREATE INDEX – Creates an index (search key)
  • DROP INDEX – deletes an index

The DCL part of SQL gives or takes back various types of permissions and rights on database tables and other objects The most important DCL statements in SQL are:

  • GRANT-grants a right/permission/privilege on a database object
  • REVOKE-removes a right/permission/privilege from a database object