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.
例如,SELECT语句对数据库的内容没有影响。
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.
澄清一下,我并不是指幂等运算,它可以重复多次,而不会多次修改数据。
2 个解决方案
#1
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.
SQL92标准的第4.22.2节将处理数据的语句归类为“SQL-data语句”,其中更改数据的语句是“SQL-data更改语句”的子类别。但是,它没有为不改变任何数据的SQL-data语句定义一个类别。
#2
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.
进一步阅读:*上的命令查询分离。
#1
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.
SQL92标准的第4.22.2节将处理数据的语句归类为“SQL-data语句”,其中更改数据的语句是“SQL-data更改语句”的子类别。但是,它没有为不改变任何数据的SQL-data语句定义一个类别。
#2
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.
进一步阅读:*上的命令查询分离。