2.2.2 The Data Manipulation Language (DML)
DML A language that provides a set of operations to support the basic data manipulation
operations on the data held in the database.
Data manipulation operations usually include the following:
• insertion of new data into the database;
• modification of data stored in the database;
• retrieval of data contained in the database;
• deletion of data from the database.
Therefore, one of the main functions of the DBMS is to support a data manipulation language
in which the user can construct statements that will cause such data manipulation to
occur. Data manipulation applies to the external, conceptual, and internal levels. However,
at the internal level we must define rather complex low-level procedures that allow
efficient data access. In contrast, at higher levels, emphasis is placed on ease of use and
effort is directed at providing efficient user interaction with the system.
The part of a DML that involves data retrieval is called a query language. A query
language can be defined as a high-level special-purpose language used to satisfy diverse
requests for the retrieval of data held in the database. The term ‘query’ is therefore reserved
to denote a retrieval statement expressed in a query language. The terms ‘query language’
and ‘DML’ are commonly used interchangeably, although this is technically incorrect.
DMLs are distinguished by their underlying retrieval constructs. We can distinguish
between two types of DML: procedural and non-procedural. The prime difference
between these two data manipulation languages is that procedural languages specify how
the output of a DML statement is to be obtained, while non-procedural DMLs describe
onlywhat output is to be obtained. Typically, procedural languages treat records individually,
whereas non-procedural languages operate on sets of records.