Explain the ACID properties of a database transaction using a bank transfer of ₹1,000 from account A to account B.
Show the explanation
Model answer. The transfer is two updates: debit A, credit B.
- Atomicity: both updates happen or neither does; if the credit fails, the debit is rolled back.
- Consistency: the transaction moves the database from one valid state to another (e.g. balances never go negative if that is a rule; total money is unchanged).
- Isolation: concurrent transactions do not see each other's half-done work; another transfer reading A meanwhile sees either the old or the new balance, depending on the isolation level.
- Durability: once committed, the transfer survives a crash (write-ahead log flushed to disk).
Follow-ups: isolation levels (read committed, repeatable read, serializable) and anomalies such as dirty reads and lost updates.
Original UniCircle question. Last reviewed 21 Oct 2026.
