Cassandra 的目标 Batch声明是group一个分区上的语句 together在一个atomic操作(全部通过或失败together)。
这与 SQL Transaction 的方式非常相似作品。
对我来说,主要区别似乎是使用 SQL 事务,您会得到 ACID consistency guarantee在它的末尾,您不一定会通过 Cassandra Batch 语句得到它。
我的问题是:Cassandra 中的 BATCH 语句和 SQL 中的事务之间有何异同?
最佳答案
Cassandra 仅支持分区级别的原子性和隔离性
Cassandra does not use RDBMS ACID transactions with rollback or locking mechanisms, but instead offers atomic, isolated, and durable transactions with eventual/tunable consistency that lets the user decide how strong or eventual they want each transaction’s consistency to be.
As a non-relational database, Cassandra does not support joins or foreign keys, and consequently does not offer consistency in the ACID sense
了解更多:http://docs.datastax.com/en/cassandra/3.0/cassandra/dml/dmlTransactionsDiffer.html
关于cassandra - Cassandra 中的 BATCH 语句和 SQL 中的事务有何异同?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44469269/