请输入您要查询的百科知识:

 

词条 Data manipulation language
释义

  1. SQL

  2. Variants

  3. See also

     Statements  Related languages 

  4. References

  5. External links

{{Refimprove|date=June 2009}}

A data manipulation language (DML) is a computer programming language used for adding (inserting), deleting, and modifying (updating) data in a database. 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.[1] 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 a relational database.[2] Other forms of DML are those used by IMS/DLI, CODASYL databases, such as IDMS and others.

SQL

In SQL, the data manipulation language comprises the SQL-data change statements,[3] which modify stored data but not the schema or database objects. Manipulation of persistent database objects, e.g., tables or stored procedures, via the SQL schema statements,[3] 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.[3]

The SQL-data change statements are a subset of the SQL-data statements; this also contains the SELECT query statement,[3] 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,[4] 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. 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 and DB2's SQL_PL.

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,[2] 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 and declarative programming.

Data manipulation languages were initially only used within computer programs, but with the advent of SQL have come to be used interactively by database administrators.

See also

  • CRUD

Statements

  • Select (SQL)
  • Insert (SQL)
  • Update (SQL)
  • Delete (SQL)

Related languages

  • Data control language
  • Data definition language
  • Data query language

References

1. ^{{cite book|title=Structured Query Language By Example - Volume I: Data Query Language|first=Mark|last=Chatham|year=2012|isbn=978-1-29119951-2|page=[https://books.google.com/books?id=64MBBAAAQBAJ&pg=PA8 8]}}
2. ^SQL92
3. ^SQL92 4.22.2, SQL statements classified by function
4. ^{{cite web |title=Data Manipulation Language Statements |url=http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm#i18503 |publisher=Oracle |quote=Data manipulation language (DML) statements query or manipulate data in existing schema objects.}}
{{refbegin}}
  • {{cite web

|url=http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt
|title=The SQL92 standard
|ref=SQL92
}}{{refend}}

External links

  • [https://oracletutorial.net/dml-ddl-commands-in-oracle.html DDL and DML Commands In Oracle]
{{Database}}{{databases}}

2 : Data modeling|SQL

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/12 4:55:39