Data manipulation language
   HOME

TheInfoList



OR:

A data manipulation language (DML) is a computer
programming language A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language. The description of a programming ...
used for adding (inserting), deleting, and modifying (updating) data in a
database In computing, a database is an organized collection of data stored and accessed electronically. Small databases can be stored on a file system, while large databases are hosted on computer clusters or cloud storage. The design of databases s ...
. A DML is often a sublanguage of a broader database language such as SQL, with the DML comprising some of the operators in the language. Read-only selecting of data is sometimes distinguished as being part of a separate data query language (DQL), but it is closely related and sometimes also considered a component of a DML; some operators may perform both selecting (reading) and writing. A popular data manipulation language is that of Structured Query Language (SQL), which is used to retrieve and manipulate
data In the pursuit of knowledge, data (; ) is a collection of discrete Value_(semiotics), values that convey information, describing quantity, qualitative property, quality, fact, statistics, other basic units of meaning, or simply sequences of sy ...
in a relational database. SQL92 Other forms of DML are those used by IMS/DLI,
CODASYL CODASYL, the Conference/Committee on Data Systems Languages, was a consortium formed in 1959 to guide the development of a standard programming language that could be used on many computers. This effort led to the development of the programming l ...
databases, such as
IDMS The Integrated Database Management System (IDMS) is a network model (CODASYL) database management system for mainframes. It was first developed at B.F. Goodrich and later marketed by Cullinane Database Systems (renamed Cullinet in 1983). Sinc ...
and others.


SQL

In SQL, the data manipulation language comprises the ''SQL-data change'' statements, which modify stored data but not the
schema The word schema comes from the Greek word ('), which means ''shape'', or more generally, ''plan''. The plural is ('). In English, both ''schemas'' and ''schemata'' are used as plural forms. Schema may refer to: Science and technology * SCHEMA ...
or database objects. Manipulation of persistent database objects, e.g., tables or stored procedures, via the SQL schema statements, SQL92 4.22.2, SQL statements classified by function rather than the data stored within them, is considered to be part of a separate data definition language (DDL). In SQL these two categories are similar in their detailed syntax, data types, expressions etc., but distinct in their overall function. The ''SQL-data change'' statements are a subset of the ''SQL-data'' statements; this also contains the SELECT query statement, which strictly speaking is part of the DQL, not the DML. In common practice though, this distinction is not made and ''SELECT'' is widely considered to be part of DML, so the DML consists of all ''SQL-data'' statements, not only the ''SQL-data change'' statements. The SELECT ... INTO ... form combines both selection and manipulation, and thus is strictly considered to be DML because it manipulates (i.e. modifies) data. Data manipulation languages have their functional capability organized by the initial word in a statement, which is almost always a
verb A verb () is a word ( part of speech) that in syntax generally conveys an action (''bring'', ''read'', ''walk'', ''run'', ''learn''), an occurrence (''happen'', ''become''), or a state of being (''be'', ''exist'', ''stand''). In the usual descr ...
. In the case of SQL, these verbs are: * SELECT ... FROM ... WHERE ... (strictly speaking DQL) ** SELECT ... INTO ... * INSERT INTO ... VALUES ... * UPDATE ... SET ... WHERE ... * DELETE FROM ... WHERE ... For example, the command to insert a row into table employees: INSERT INTO employees (first_name, last_name, fname) VALUES ('John', 'Capita', 'xcapit00');


Variants

Most SQL database implementations extend their SQL capabilities by providing imperative, i.e. procedural languages. Examples of these are Oracle's
PL/SQL PL/SQL (Procedural Language for SQL) is Oracle Corporation's procedural extension for SQL and the Oracle relational database. PL/SQL is available in Oracle Database (since version 6 - stored PL/SQL procedures/functions/packages/triggers since ...
and IBM Db2's
SQL_PL SQL PL stands for Structured Query Language Procedural Language and was developed by IBM as a set of commands that extend the use of SQL in the IBM Db2 (DB2 UDB Version 7) database system. It provides procedural programmability in addition to th ...
. Data manipulation languages tend to have many different flavors and capabilities between database vendors. There have been a number of standards established for SQL by
ANSI The American National Standards Institute (ANSI ) is a private non-profit organization that oversees the development of voluntary consensus standards for products, services, processes, systems, and personnel in the United States. The organi ...
, but vendors still provide their own extensions to the standard while not implementing the entire standard. Data manipulation languages are divided into two types,
procedural programming Procedural programming is a programming paradigm, derived from imperative programming, based on the concept of the '' procedure call''. Procedures (a type of routine or subroutine) simply contain a series of computational steps to be carrie ...
and declarative programming. Data manipulation languages were initially only used within
computer program A computer program is a sequence or set of instructions in a programming language for a computer to execute. Computer programs are one component of software, which also includes documentation and other intangible components. A computer program ...
s, but with the advent of SQL have come to be used interactively by database administrators.


See also

*
CRUD In computer programming, create, read, update, and delete (CRUD) are the four basic operations of persistent storage. CRUD is also sometimes used to describe user interface conventions that facilitate viewing, searching, and changing information u ...


Statements

*
Select (SQL) The SQL SELECT statement returns a result set of records, from one or more tables. A SELECT statement retrieves zero or more rows from one or more database tables or database views. In most applications, SELECT is the most commonly used data ...
*
Insert (SQL) An SQL INSERT statement adds one or more records to any single table in a relational database. Basic form Insert statements have the following form: The number of columns and values must be the same. If a column is not specified, the default ...
*
Update (SQL) An SQL UPDATE statement changes the data of one or more records in a table. Either all the rows can be updated, or a subset may be chosen using a condition. The UPDATE statement has the following form: :UPDATE ''table_name'' SET ''column_name ...
*
Delete (SQL) In the database structured query language ( SQL), the DELETE statement removes one or more records from a table. A subset may be defined for deletion using a condition, otherwise all records are removed. Some database management systems (DBMSs) ...


Related languages

* Data control language * Data definition language * Data query language


References

*


External links


DML Commands in Oracle
{{Database Data modeling SQL Articles with example SQL code