1

Is there a catch-all term for database operations that don't alter any data at all?

For example, SELECT statements have no effect on the contents of the database.

On the other hand, INSERT, UPDATE, and DELETE statements have the potential to create, edit, or remove data.

To clarify, I'm not referring to idempotent operations, which can be repeated multiple times without altering data more than once.

Chris Schiffhauer
  • 17,102
  • 15
  • 79
  • 88

2 Answers2

1

Section 4.22.2 of the SQL92 standard classifies statements that handle data as "SQL-data statements", out of which the statements that change data are a subcategory, "SQL-data change statements". It does not, however, define a category for SQL-data statements that do not change any data.

Mureinik
  • 297,002
  • 52
  • 306
  • 350
1

I believe the correct term for operations that don't change data is 'query'.

And I believe the correct term for operations that do change data is 'command', which may or may not be idempotent.

Further reading: Command-query separation on Wikipedia.

Chris Schiffhauer
  • 17,102
  • 15
  • 79
  • 88