Databases & Transactions interview question · Most asked

What does ACID mean?

Summary

ACID describes transaction guarantees: Atomicity (all or nothing), Consistency (constraints hold before and after), Isolation (concurrent transactions don't see each other's partial work, to a configured degree), and Durability (committed data survives crashes).

Longer Answer

Atomicity is implemented with undo/redo logs, durability with write-ahead logs (WAL) flushed to disk, isolation with locks and/or MVCC snapshots. Consistency also depends on your schema constraints and application logic. Many NoSQL systems relax some of these properties for scale (BASE: basically available, soft state, eventual consistency).

Key Points

  • Atomicity: all or nothing
  • Consistency: constraints hold
  • Isolation: levels control anomalies
  • Durability: WAL on disk
  • BASE as the relaxed alternative

More most-asked Databases & Transactions questions

← All Databases & Transactions questions