0

I understand that DML technically encompasses SQL verbs which merely query but do not modify persistent data. (See, e.g., wikipedia or oracle or orafaq)

However, I often wish to refer to "all and only those SQL verbs which modify stored/persistent data" -- basically INSERT, UPDATE, DELETE but not a plain SELECT. Is there an official/standardized term, or, perhaps separately, a cogent and graceful term, for this subset of DML?

pilcrow
  • 56,591
  • 13
  • 94
  • 135

5 Answers5

2

DML includes SELECT INTO (as opposed to just SELECT) because it is a synonym for INSERTs. There's no need to subcategorize.

After thinking about it on the way into work, I remembered that SELECT is used for data manipulation. For example:

SELECT t.firstname +' '+ t.lastname --String concatenation
SELECT CAST(t.column AS int) --Datatype change
OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
  • Yes, DML is the term you're looking for. – Rob H Sep 30 '09 at 15:11
  • Yes and clever, but a plain SELECT can only transform data in ephemeral projections, it cannot modify the stored or persistent data, which is the intent behind my question. I'll clarify. – pilcrow Sep 30 '09 at 18:24
  • 1
    @pilcrow: Modification implies persistence, but there are cases where persistence isn't required - the need is temporary. But it is still data manipulation. – OMG Ponies Sep 30 '09 at 18:51
1

My professor used to define them as Edits (as opposed to Reads), but I do not know of a Standard Term for IUD.

Raj More
  • 47,048
  • 33
  • 131
  • 198
0

based on CRUD: Create, read, update and delete, you could just say CUD (create, update, delete). however, I'm not sure if anyone uses that.

KM.
  • 101,727
  • 34
  • 178
  • 212
0

I don't think there is one, sadly, from an official perspective. Perhaps we need to make one up?

Personally, I think the term DML is misleading because the term doesn't really describe the way SELECT works, as it (usually) doesn't actually modify anything. It only "collects" the relational data in a different fashion in temporary space and returns a specified set of it.

So, if it was my choice, I would say that:

DML would describe INSERT/UPDATE/DELETE

and

DRL (data retrieval language) would describe SELECT.

J. Polfer
  • 12,251
  • 10
  • 54
  • 83
  • Accepted. While I think we'd argue ad infinitum about new terminology, I think the thrust of your answer is dead on. – pilcrow Oct 07 '09 at 16:13
  • 1
    Maybe we could all just agree that DML means "Data Manipulation Language" (as opposed to DDL, which is still "Data Definition Language"). :) – Ian Varley Jul 01 '10 at 16:17
0

According to the Wikipedia article on SQL,

The Data Manipulation Language (DML) is the subset of SQL used to add, update and delete data:

and the statements discussed there (INSERT, UPDATE, DELETE, MERGE, TRUNCATE, etc) are placed in a different category than SELECT.

So, according to Wikipedia, DML may not necessarily include SELECT.


According to the SQL-92 standard, glancing at the table-of-contents reveals that DML does include SELECT INTO:

     13 Data manipulation ............................................371

     (...)

     13.5 <select statement: single row> .............................382

     (...)

The definition listed there describes SELECT <columns> INTO ... .

J. Polfer
  • 12,251
  • 10
  • 54
  • 83