The CAP theorem postulates that, in distributed systems, only two of three characteristics can coexist: consistency (C), availability (A) and partition tolerance (P). The principles used in relational databases or NoSQL are derived from this theorem. [1]

ACID and BASE are consistency models used, essentially, in relational and NoSQL databases, respectively. Yes, these acronyms are jokingly inspired by the properties of substances in chemistry. But, in fact, computationally talking, they mean different things.

ACID (atomicity, consistency, isolation, durability) is a set of properties of database transactions intended to guarantee data validity despite errors, power failures, and other mishaps. ACID transactions are more concerned with data security and, for NoSQL databases, where the amount of data is large, ACID can be difficult to obtain.

For this reason, NoSQL systems focus on the BASE principle, [1] short for Basically Available (availability present even if partitions fail), Soft-state (over a period of time, the state can be asynchronous), and Eventual consistency (even when data are not consistent, they will eventually be) [2].

Cassandra, in this way, works with the BASE model.

Cassandra is an AP system according to CAP Theorem, with high availability and partition tolerance. But it can function more like a CP system (consistent and partition tolerance), depending on the requirements of the application. Consistency refers to how all one-line replicas of Cassandra data are updated and synchronized at any time. However, it is not possible for Cassandra to act as a CA system, namely, it is not possible to sacrifice the tolerance of the partition. [3]

Cassandra has nine levels of consistency, both for reading and writing, which can be configured to control availability versus data accuracy. These adjustments can be made for a session or for an individual read or write operation. [4]


[1] V. Abramova and J. Bernardino, “NoSQL databases: MongoDB vs Cassandra,” ACM Int. Conf. Proceeding Ser., pp. 14–22, 2013, doi: 10.1145/2494444.2494447.

[2] G. Wang and J. Tang, “The NoSQL principles and basic application of cassandra model,” Proc. – 2012 Int. Conf. Comput. Sci. Serv. Syst. CSSS 2012, pp. 1332–1335, 2012, doi: 10.1109/CSSS.2012.336.

[3] Datastax Documentation. How are consistent read and write operations handled? Acessado em 18/11/2020.

[4] Datastax Documentation. How is the consistency level configured? Acessado em 18/11/2020.