Database System Design Fundamentals: ACID, CAP Theorem, and Distributed Consistency Models

The Foundation of Distributed Data Engineering

When designing distributed data systems at scale, engineers quickly discover that there is no single “best database.” The architectural decisions governing how databases store, replicate, and coordinate data across network partitions are governed by fundamental laws of computer science: the CAP Theorem, PACELC, and ACID transactional guarantees.

Choosing between CockroachDB, Cassandra, PostgreSQL, and DynamoDB requires understanding the mathematical tradeoffs between consistency, latency, availability, and partition tolerance.

In this system design guide, we deconstruct database consistency models, dissect transactional isolation levels, and establish an architectural taxonomy for choosing databases in production.


ACID vs. BASE: The Philosophical Divide

MetricACID (Traditional Relational)BASE (Distributed NoSQL)
Stands ForAtomicity, Consistency, Isolation, DurabilityBasically Available, Soft state, Eventual consistency
Core PhilosophyData correctness and consistency above all elseHigh availability and horizontal partition scale
Consistency ModelLinearizable / Strict SerializabilityEventual consistency (Read-your-writes, Monotonic)
Representative DatabasesPostgreSQL, MySQL (InnoDB), OracleApache Cassandra, Amazon DynamoDB, ScyllaDB

The CAP Theorem & The PACELC Refinement

Eric Brewer’s CAP Theorem states that in any asynchronous distributed network, a database can guarantee at most two of the following three properties: Consistency (C), Availability (A), and Partition Tolerance (P).

Because physical network cables can be severed, switches fail, and packets drop, Partition Tolerance (P) is mandatory in distributed systems. Therefore, the true real-world choice is between **CP** and **AP**:

  • CP Systems (Consistency + Partition Tolerance): When a network split occurs, nodes reject writes rather than serve inconsistent data (e.g. HBase, MongoDB with w:majority, Raft/Paxos clusters).
  • AP Systems (Availability + Partition Tolerance): When a network split occurs, all nodes accept reads and writes, reconciling discrepancies later via vector clocks or last-write-wins (e.g. Cassandra, DynamoDB).

The PACELC Theorem

Daniel Abadi extended CAP to model normal non-partitioned operation: If Partition (P) choose between Availability (A) and Consistency (C); Else (E) choose between Latency (L) and Consistency (C).

PACELC Database Taxonomy:
- PC/EC (e.g. Spanner, CockroachDB): Consistency during partition, Consistency in normal state.
- PA/EL (e.g. Cassandra, DynamoDB): Availability during partition, Low Latency in normal state.

Frequently Asked Questions (FAQ)

What is the difference between Read Committed and Serializable isolation?

Read Committed guarantees you never read dirty uncommitted data from other transactions, but successive reads within the same transaction can return different values (Non-repeatable read). Serializable is the highest isolation level: it guarantees that transactions execute as if they ran in strict sequential order, eliminating phantom reads and write skew anomalies.


Continue expanding your technical depth with our related engineering guides:

Published by Mohit Kumar under Database Engineering. Read our sharding blueprint on MongoDB Sharding & Replication Architecture.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top