Skip to content

ACID vs BASE

ACID guarantees strict consistency. BASE relaxes consistency for higher availability.


PropertyStands ForWhat It Means
AAtomicityA transaction either completes fully or not at all. No partial updates.
CConsistencyData always follows rules (constraints, triggers).
IIsolationConcurrent transactions don’t interfere with each other.
DDurabilityOnce committed, data survives crashes (written to disk).

Analogy — Bank transfer: You transfer $100 from A to B. Either both accounts update (atomic), or neither does. If the server crashes mid-transfer, your money isn’t lost.


PropertyStands ForWhat It Means
BABasically AvailableThe system responds to every request (even if data is stale).
SSoft StateData may change over time without input (replicas syncing).
EEventual ConsistencyGiven enough time, all copies converge to the same data.

Analogy — Social media: Alice posts a photo. Bob (across the world) might not see it for a few seconds. But eventually, his feed will show it.


AspectACIDBASE
ConsistencyStrong (immediate)Eventual (converges over time)
AvailabilityLower (can reject writes to preserve consistency)High (always accepts writes)
PerformanceSlower (locking, logging)Faster (no locking overhead)
Use caseBanking, inventory, billingSocial feeds, recommendations, logs
Example DBPostgreSQL, MySQLCassandra, MongoDB (tunable)

  • ACID is safe but slower. BASE is fast but data might be stale.
  • Pick ACID when data correctness is critical (money, hospital records).
  • Pick BASE when scale and availability matter more than immediate consistency (social feeds, analytics).

  • ACID = strict rules. All or nothing. Transaction is always correct.
  • BASE = relaxed rules. Accept writes now, fix consistency later.
  • Banks use ACID. Social media uses BASE. Neither is “better” — it depends on the problem.