Transactions & Concurrency Language
5 exercises — practise the English vocabulary for advanced concurrency discussions: ACID properties mapped to real scenarios, isolation level anomalies, optimistic vs. pessimistic locking, dirty reads, and the 2PL vs. 2PC distinction.
0 / 5 completed
1 / 5
A developer asks in an architecture review: "Should this operation be wrapped in a transaction?" Which explanation correctly links all four ACID properties to a real-world scenario — a bank transfer that debits Account A and credits Account B?
ACID property vocabulary with real-world mapping:
Option A is the only response that correctly maps all four ACID properties to their database-level guarantees.
Option A is the only response that correctly maps all four ACID properties to their database-level guarantees.
| Property | Guarantee | Bank transfer example |
|---|---|---|
| Atomicity | All operations in the transaction succeed or all are rolled back | Debit and credit are a single unit — no partial transfer |
| Consistency | The transaction moves the database from one valid state to another, honouring all constraints | Total balance is conserved; no constraint (e.g., balance >= 0) is violated |
| Isolation | Concurrent transactions appear to execute serially — intermediate states are not visible to others | A concurrent balance read does not see the "mid-transfer" state where A is debited but B is not yet credited |
| Durability | Committed data persists even after a crash (guaranteed by WAL) | The committed transfer record survives a power failure |