sql batch 和 orientdb 中的 transaction 有什么区别?
What is the difference between sql batch and transaction in orientdb?
我通读了文档,SQL BATCH 命令和事务似乎实现了相同的目的,即将所有语句作为全有或全无事务提交。
这是正确的,还是我遗漏了什么?
我通过 PhpOrient 语言绑定使用 Orient,看到它同时支持事务和批处理,但我只使用 SQL 并且只想使用 SQL 执行事务。从我的测试来看似乎是一样的,但我想确认一下。
SQL批量
a) SQL批处理只是需要执行的命令的集合,没有保证成功或失败。
b) 批处理是指将事物放入队列中,当达到一定数量时或经过一定时间后进行处理。你可以在这做undo/rollback。
在批处理中,银行只会将 xyz 的存款请求排队。银行只会将您的请求与所有其他请求一起排队,并在一天结束时或当它们达到一定数量时处理它们。
SQL 交易
a) SQL 事务是保证成功或失败的命令的集合 totally.Transactions 不会完成一半的命令然后在其余命令上失败,如果一个失败,它们都会失败.
b) 事务类似于实时处理,允许您 rollback/undo 更改。
在 TRANSACTIONS 中,它就像批处理一样,但您可以选择 "cancel" 它。
transaction
Transactions are atomic units of work that can be committed or rolled back. When a transaction makes multiple changes to the database, either all the changes succeed when the transaction is committed, or all the changes are undone when the transaction is rolled back.
Database transactions, as implemented by InnoDB, have properties that are collectively known by the acronym ACID, for atomicity, consistency, isolation, and durability.
我通读了文档,SQL BATCH 命令和事务似乎实现了相同的目的,即将所有语句作为全有或全无事务提交。
这是正确的,还是我遗漏了什么?
我通过 PhpOrient 语言绑定使用 Orient,看到它同时支持事务和批处理,但我只使用 SQL 并且只想使用 SQL 执行事务。从我的测试来看似乎是一样的,但我想确认一下。
SQL批量
a) SQL批处理只是需要执行的命令的集合,没有保证成功或失败。
b) 批处理是指将事物放入队列中,当达到一定数量时或经过一定时间后进行处理。你可以在这做undo/rollback。
在批处理中,银行只会将 xyz 的存款请求排队。银行只会将您的请求与所有其他请求一起排队,并在一天结束时或当它们达到一定数量时处理它们。
SQL 交易
a) SQL 事务是保证成功或失败的命令的集合 totally.Transactions 不会完成一半的命令然后在其余命令上失败,如果一个失败,它们都会失败.
b) 事务类似于实时处理,允许您 rollback/undo 更改。
在 TRANSACTIONS 中,它就像批处理一样,但您可以选择 "cancel" 它。
transaction
Transactions are atomic units of work that can be committed or rolled back. When a transaction makes multiple changes to the database, either all the changes succeed when the transaction is committed, or all the changes are undone when the transaction is rolled back.
Database transactions, as implemented by InnoDB, have properties that are collectively known by the acronym ACID, for atomicity, consistency, isolation, and durability.