Four SQL languages: DDL, DML, DCL, TCL, and dmldcl

Source: Internet
Author: User

Four SQL languages: DDL, DML, DCL, TCL, and dmldcl
1. DDL (Data Definition Language)

Database Definition Language statements are used to define the database structure or schema. Defines the three-level structure of the database, including the external mode, conceptual mode, internal mode and the image between them, and defines constraints such as data integrity and security control. DDL does not require commit.

DDL operations include:

CREATE
ALTER
DROP
TRUNCATE
COMMENT
RENAME

2. DML (Data Manipulation Language)

The data manipulation language statements are used for managing data within schema objects. Provided by DBMS, it is used by users or programmers to perform operations on data in the database. DML is divided into two types: Simplified DML and embedded DML. Based on the language level, DML can be further divided into procedural DML and non procedural DML. Commit is required.

DML operations include:

SELECT
INSERT
UPDATE
DELETE
MERGE
CALL
EXPLAIN PLAN
LOCK TABLE

3. DCL (Data Control Language)

Database Control language, such as authorization and role control. DCL operations include:

GRANT authorization
REVOKE authorization from REVOKE
4. TCL (Transaction Control Language)

Transaction Control Language. TCL operations include:

SAVEPOINT settings
ROLLBACK
SET TRANSACTION

5. Conclusion:

SQL is mainly divided into four parts:

(1) data definition. (DDL) is used to define the SQL mode, basic tables, views, and indexes.
(2) data manipulation. (DML) data manipulation is divided into two types: Data Query and data update. Data Update is divided into insert, delete, and modify operations.
(3) Data Control. Includes authorization for basic tables and views, description of integrity rules, and transaction control.
(4) embedded SQL usage regulations. It involves the rules used by SQL statements embedded in the host language program.
In addition to adding, deleting, modifying, and querying databases, what operations can be performed?

Your problem is general, if it is a database language action.
It is basically included in addition, modification, deletion, and query.

However, if detailed technical content is involved, the scope will be relatively large.
Includes system deployment, data relations, data constraints, data security, data migration, technical authorization, organization role definition and authorization, and computing policies.

What is "DDL", "DML", and "DCL?

SQL composition:
DDL: database mode definition language; Keyword: create
DML: data manipulation language; keywords: Insert, delete, and update
DCL: Database Control Language, Keyword: grant, remove
DQL: Database Query Language, Keyword: select

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.