What are the acronyms DDL, DML, DQL, DTL and DCL?

Asked

Viewed 67,807 times

24

I was setting up a permissions structure in the bank (GRANT, REVOKE), when I found this article and found it interesting to share, even to have here at Sopt.

Original issue

  • What is DCL?

Source

2 answers

48


Think like this, the SQL language is only one, but it is divided into types according to the functionality of the commands.
The SQL language types are:

  • DDL - Data Definition Language - Data Definition Language.
    These are commands that interact with bank objects.

    • These are DDL commands : CREATE, ALTER and DROP
  • DML - Data Manipulation Language - Data Manipulation Language.
    It is the commands that interact with the data within the tables.

    • DML : INSERT, DELETE and UPDATE commands
  • DQL - Data Query Language - Data Query Language.
    These are the query commands.

    • These are DQL commands : SELECT (this is the query command)
      Here fits a parentheses. In some books the SELECT stays in the DML in others has this own group.
  • DTL - Data Transaction Language - Data Transaction Language.
    These are the commands for transaction control.

    • DTL : BEGIN TRANSACTION, COMMIT AND ROLLBACK commands
  • DCL - Data Control Language - Data Control Language.
    These are the commands to control the security part of the database.

    • DCL commands : GRANT, REVOKE AND DENY.

Original author

Luiz Fernando
Source

  • Some places where it is relative to differentiate the DQL from the DML: https://answall.com/a/292433/64969; I do not like to say that they are different sets, so I prefer to say that the operations that change the bank are the DML by removing the DQL; in set notation would be DML DQL

12

A simpler way to be remembered

What differentiates the acronyms is the middle letter.

Such as, for example:

  • DML = "M" from the middle comes of Manipulation.
  • DDL = "D" from the middle comes of Definition.
  • DCL = "C" from the middle comes of Control.
  • DTL = "T" from the middle comes of Transaction.
  • DQL = "Q" from the middle comes of "Qonsulta".
  • 2

    "Qonsulta" +1 haha

Browser other questions tagged

You are not signed in. Login or sign up in order to post.