What are the functions of DDL and DML in a DBMS?
DBMS stands for database management system. A DBMS is software that interfaces between a database and the users. A DBMS is designed to carry out data manipulations, retrieval, and storage.
There are different commands that a DBMS uses to perform its functionality, including DDL and DML.
DDL
DDL (Data Definition Language) is a suite of routines and instructions that are used to define the database and manipulate the database itself by creating and altering its tables, relations, and structure. The database definition language is used to specify the data to be stored and assigned characteristics.
Some basic DDL commands that are used to define the database scheme are as follows:
CREATEALTERCOMMENTRENAMETRUNCATEDROP
Command descriptions
- The
createcommand is used to aid the creation of a database. - The
altercommand is used to alter the structure of the database. - The
commentcommand is used to make comments to the data dictionary. - The
renamecommand is used to rename an already existing object in the database.
DML
DML (Data Manipulation Language) is a suite of routines and commands that allows manipulation and alteration of the data in the database.
Some basic DML commands include:
SELECTINSERTUPDATEDELETELOCK
Command descriptions
-
DML can be used to retrieve data from the database based on specific criteria with
selectstatements. -
We use the
insertcommand to insert data into a table. -
Data manipulation language is used to update existing data within a database table with the
updatecommand. -
Data manipulation language helps to delete records from a database table with the
deletecommand. -
Data manipulation language includes the
lockcommand that helps maintain table .concurrency allowing multiple users to access the database simultaneously