volume_mute
ATM Transaction Example
publish date: 2026/06/10 22:54:1.269481 UTC
volume_mute
Consider a customer withdrawing cash from a bank ATM. Which statement correctly explains why this constitutes a database transaction?
Correct Answer
Because it involves getting customer account details, checking the balance, modifying the balance by the amount withdrawn, and commanding the ATM to deliver cash - all of which must be completed as a unit before the database is changed
Explanation
A cash withdrawal involves: getting customer account details, checking the balance, modifying the balance by the withdrawal amount, and sending commands to deliver cash. Until all of these steps are completed, the transaction is incomplete and the customer accounts database is not changed. This is the definition of an atomic transaction - all steps succeed or none do.
Reference
Software Engineering, Ian Sommerville, 10th edition
