ACID vs BASE in Databases :👈 👉:Eventual Consistency

PACELC Theorem

🌐 PACELC Theorem

The PACELC theorem is an extension of the CAP theorem that provides a more complete framework for understanding trade-offs in distributed databases.

  • CAP theorem says: In the presence of a Partition (P), a distributed system must choose between Availability (A) and Consistency (C).
  • PACELC theorem adds: Else (E) β€” even when there is no partition β€” systems must still make a trade-off between Latency (L) and Consistency (C).

πŸ”‘ PACELC Breakdown

  • P: Partition tolerance β€” unavoidable in distributed systems.
  • A: Availability β€” system responds even if some nodes fail.
  • C: Consistency β€” all nodes see the same data at the same time.
  • E: Else β€” what happens when there is no partition.
  • L: Latency β€” how quickly the system responds.

πŸ‘‰ In short:

  • During a partition (P) β†’ choose A or C.
  • Else (E), when no partition β†’ choose L or C.
PACELC Theorem Partition occurs (P)? Yes Trade-off: Availability (A) vs Consistency (C) No Trade-off: Latency (L) vs Consistency (C) Example: DynamoDB β†’ Availability during P β†’ Low Latency else Example: Google Spanner β†’ Consistency during P β†’ Consistency else

πŸ“Š Example

  • Amazon DynamoDB: BASE-oriented β†’ favors Availability during partitions, and Low Latency otherwise.
  • Google Spanner: ACID-oriented β†’ favors Consistency during partitions, and Consistency even when no partition (higher latency).

βœ… Pros of PACELC

  • More realistic than CAP β€” covers both partition and non-partition scenarios.
  • Helps architects design systems with clear trade-offs.
  • Explains why some databases are fast but eventually consistent, while others are slower but strongly consistent.

⚠️ Cons

  • Complexity: Harder to explain and apply than CAP.
  • No β€œperfect” system β€” trade-offs are inevitable.
  • Requires deep understanding of workload and priorities.

πŸ† Best Practices

  • Use PACELC to evaluate distributed databases (NoSQL, NewSQL, cloud-native DBs).
  • Match system choice to business needs:
    • Financial systems β†’ Consistency first (C over A, C over L).
    • Social media feeds β†’ Availability + Low Latency (A over C, L over C).
  • Document trade-offs clearly for stakeholders.

πŸ“Œ Key Takeaway

PACELC theorem says:

  • If Partition (P) β†’ trade-off between Availability (A) and Consistency (C).
  • Else (E) β†’ trade-off between Latency (L) and Consistency (C).

It’s the natural evolution of CAP, giving a fuller picture of distributed system design.

Back to Index
ACID vs BASE in Databases :👈 👉:Eventual Consistency
*