SQL defines many statements for different things: creating tables, putting data into tables, using tables, between other things. To reason about groups of statements with related behavior, the data community uses common, widely accepted acronyms to designate these groups.
For example, the acronym “DDL” stands for “data definition language”, the subset of SQL that modifies the logical schema of a database (CREATE, etc.).
However, what about “DML” which stands for “data manipulation language”. What does “manipulation” mean?
Fun fact: it depends who you ask!
There are two widely accepted but rather different definitions circulating in the wild:
- “Data Modification”, i.e. only INSERT, UPDATE, DELETE, and the like, which modify the data inside tables. The following sources agree with this definition:
- “Anything that accesses data”, including both data modification and read-only queries using only SELECT. The following sources agree with this definition:
What to do? Like always, do not assume too much about what your community knows about your vocabulary. Define your terms! And in the specific case of “DML”, qualify: “DML, of the church of Oracle” (or “PostgreSQL”), or “DML, of the church of SQL Server” (or “MySQL”).
So what do you think? Did I miss something? Is any part unclear? Leave your comments below.