Britannica Sources used in this answer

Why must a bank transfer be handled as one complete database transaction?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

A bank transfer must be handled as a single, indivisible database transaction to ensure data integrity.

In a transfer of funds between two accounts—for example, moving $5 from account A to account B—the process involves two distinct operations: deducting the amount from the first account and adding it to the second. If these operations were treated separately, the database would temporarily lose integrity; the system would reflect a $5 deficit after the deduction or a $5 surplus after the addition before the second half of the transfer is completed.

By combining these steps into one complete transaction, the database management system ensures that the database transitions from one consistent state to another without leaving the total balance of the accounts in an incorrect state. This approach guarantees that either the entire transfer is applied successfully or, in the event of an error, none of it is applied, thereby maintaining the accuracy and stability of the financial data.1