Get the App
SLTechnology News&Howtos  ›  Database  › 

Comparative Analysis of DML and DDL

Shulou Source: shulou.com Published: 2022-06-01 01:53:04 09月24日 Update

The editor will share with you the comparative analysis of DML and DDL. I hope you will gain a lot after reading this article. Let's discuss it together.

DDL: database definition language, used to create databases, create tables, etc.

DML: database management language, such as add, delete, change and query statements, etc.

DCL: database operation language, such as modifying database system permissions.

DQL: data query language, such as fuzzy query, join query.

Here is a comparison of DML,DDL.

DML languages, such as update,delete,insert, etc., require commit to modify data in tables.

DDL languages, such as create,drop, which change the table structure, do not need to write commit (because commit is hidden inside)

DDL data definition language:

Create table create table

Alter table modify table

Drop table delete table

Truncate table deletes all rows in the table

Create index creates an index

Drop index delete index

When a DDL statement is executed, oracle commits the current transaction before and after each statement. If the user uses the insert command to insert the record into the database and executes a DDL statement (such as create table), the data from the insert command is submitted to the database. When the DDL statement execution is complete, the DDL statement is automatically committed and cannot be rolled back.

DML data manipulation language:

Insert inserts records into the database

Update modifies database records

Delete deletes records from the database

When executing the DML command, if it is not submitted, it will not be seen by other sessions. Unless the DDL command or DCL command is executed after the DML command, or the user exits the session, or terminates the instance, the system automatically

Issue the commit command to commit the uncommitted DML command.

After reading this article, I believe you have a certain understanding of the comparative analysis of DML and DDL, want to know more about it, welcome to follow the industry information channel, thank you for reading!

Tags: Data database command language statement query analysis user article system index transaction done instance data query more permissions knowledge structure industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MariaDB Shulou Technology Huawei MySQL Linux