Skip to content

CS Professional · Artificial Intelligence, Data Analytics and Cyber Security - Laws and Practice · Computer Hardware and Software

A bank transfers Rs 50,000 from account A to account B. The system debits A but crashes before crediting B, and on restart the debit is reversed so neither account changes. Which ACID property of a database transaction ensures this outcome?

Atomicity ensures this outcome. A transaction must be completed entirely or not at all, so when the crash left the transfer half done, the debit was rolled back. Durability and isolation address different concerns, namely persistence of committed data and separation of concurrent transactions.

  1. AIsolation, because concurrent transactions are hidden from each other
  2. BDurability, because committed data survives failure
  3. CConsistency, because the transaction is run by one user
  4. DAtomicity, because the transaction is all-or-nothingCorrect

Explanation

Atomicity means a transaction is completed fully or not at all. Here the partial debit is rolled back. Durability concerns committed data persisting after failure, and isolation concerns concurrent transactions, which are not the issue here.

Did you get it right without looking?

One question tells you little. A timed set on Computer Hardware and Software shows your real accuracy, how long you take and where you lose marks.

More Computer Hardware and Software questions