DDL, DML, DCl, and TCP concepts in the database

Source: Internet
Author: User

1. DDL (Data Definition
Language) database definition language statements
Are used to define the database structure or schema.

DDL is one of the four functions of SQL.

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.

Create

Alter

Drop

Truncate

Comment

Rename


2. DML (data manipulation language) data manipulation language statements are used for managing data within schema objects.

Provided by DBMS for users or programmers to operate 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.

Select

Insert

Update

Delete

Merge

Call

Explain plan

Lock table


3. DCL (Data Control Language) Database Control Language authorization, role control, etc.

Grant authorization

Revoke authorization from revoke


4. TCL (transaction control language) Transaction Control Language

Savepoint settings

Rollback rollback

SET transaction

SQL is mainly divided into four parts:

(1) data definition. (SQL ddl) is used to define the creation and revocation operations of SQL modes, basic tables, views, and indexes.

(2) data manipulation. (SQL 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.

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.