Explain ACID properties and why they matter for banking or e-commerce
Mapping ACID to real failure modes in finance.
Define each as a failure-handling guarantee; show how partial commits cause double-spending.
Vague definitions that skip Isolation levels or Durability details.
WHAT THIS TESTS: This question probes whether you understand transactions as operational failure-handling contracts rather than abstract vocabulary. A senior candidate should explain each ACID property in terms of what catastrophic user-visible outcome it prevents, especially in high-stakes domains where money or inventory moves.
A GOOD ANSWER COVERS four properties in order. First, Atomicity means a transaction executes completely or not at all; if a debit succeeds and the credit fails, the entire transfer rolls back so money does not vanish. Second, Consistency means every transaction brings the database from one valid state to another valid state; in banking, this means account balances never violate invariants such as non-negativity or conservation of total funds. Third, Isolation means concurrently executing transactions do not interfere with each other; without it, two simultaneous withdrawals against a one-hundred-dollar balance could both read one hundred dollars and each debit fifty, leaving a negative balance or an inconsistent ledger. Fourth, Durability means once a transaction commits, it survives power loss, OS crashes, or disk failure; a confirmed payment must remain confirmed even if the database node restarts seconds later. After defining these, the candidate should explicitly map each guarantee to a business risk: Atomicity prevents partial ledger updates, Consistency prevents invariant violations, Isolation prevents race conditions, and Durability prevents acknowledged data loss.
COMMON WRONG ANSWERS include four patterns. One, treating Consistency as merely referential integrity or foreign-key checks rather than a broader application-level invariant. Two, describing Isolation only as locking without mentioning isolation levels such as Read Committed or Serializable and the anomalies they prevent like dirty reads or phantom reads. Three, ignoring Durability entirely or confusing it with replication; Durability is about committed writes persisting to non-volatile storage, not about multi-node redundancy. Four, asserting that ACID applies only to relational databases; many non-relational stores also offer ACID guarantees at document or shard scope.
LIKELY FOLLOW-UPS include asking which property you would relax first for performance and why, how two-phase commit enforces Atomicity across distributed services, or what anomalies appear under Read Uncommitted versus Snapshot Isolation. Interviewers may also ask for a concrete example of a transaction that is Atomic and Isolated but not Consistent if application logic is flawed.
ONE CONCRETE EXAMPLE: Consider a fifty-dollar purchase from an e-commerce wallet. Atomicity ensures that if the wallet debit succeeds but the inventory reservation fails, both operations undo and the customer is not charged. Isolation ensures that if two customers buy the last item simultaneously, one transaction blocks or retries rather than creating a negative stock count. Durability ensures that after the order confirmation page renders, a database crash does not revert the payment or the inventory deduction.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.