MIT 213_Data Management_Tutorial 07
MIT 213_Data Management_Tutorial 07
1 Introduction
Data Manipulation Language (DML) and Data Control Language (DCL) are two important
components of SQL (Structured Query Language) that are used to manage and control data in
a database system. Let's take a closer look at each of these components:
1.1 Data Manipulation Language (DML)
DML is a subset of SQL commands that deals with managing and manipulating data in the
database. It allows users to perform operations such as inserting, updating, deleting, and
retrieving data from database tables. Here are some commonly used DML commands:
• SELECT: This command is used to retrieve data or records from one or more tables in
the database.
• INSERT: It is used to insert one or more new records into a table in the database.
• UPDATE: This command is used to modify or change existing data or records in a table.
• DELETE: It is used to delete existing records from a table in the database.
• MERGE: This command allows for the insertion, updating, and deletion of data in the
same SQL statement.
1.2 Data Control Language (DCL)
DCL is another subset of SQL commands that deals with controls, rights, and permissions in
the database system. It is used to grant or revoke access privileges to database objects such as
tables, views, and procedures. Here are some commonly used DCL commands:
• GRANT: This command is used to give access privileges or permissions to database
objects.
• REVOKE: It is used to withdraw or revoke access privileges or permissions that were
previously granted using the GRANT command.
This example grants the user "user1" the SELECT and INSERT privileges on the "employees"
table [1].
This example revokes the SELECT and INSERT privileges on the "employees" table from the
user "user1" [1].
Example:
DENY DELETE
ON employees
TO user1;
This example denies the user "user1" the DELETE permission on the "employees" table [2].