Chapter 3: Atomicity, Consistency, Isolation, and Durability (ACID)
In the Chapter 2, How Does CockroachDB Work Internally, we learned about the different layers of CockroachDB. In this chapter, we will learn about what ACID is, its importance, and what the ACID guarantees that CockroachDB provides are.
ACID guarantees the following things:
- Atomicity: This is achieved through the notion of a transaction, in which all the statements within a transaction are executed as a single unit. So, either all of them succeed or fail together.
- Consistency: The database state should be consistent before and after a transaction is executed and should ensure that the database constraints are never violated.
- Isolation: Multiple transactions can get executed independently at the same time, without running into each other.
- Durability: Changes, once committed, always remain intact, irrespective of any system or network failures.
The following topics will be covered in this...