If anything goes wrong at any point, the system performs a rollback . It undoes any partial changes, returning your account balance to exactly what it was before you hit "send".
Imagine you are sending money to a friend to pay for dinner. This seemingly simple action actually requires two distinct steps within the bank's database: the amount from your account balance. Adding that same amount to your friend’s account balance. The Story of a Failed Transaction atonicity
Ensuring atomicity for database transactions (ACID properties) If anything goes wrong at any point, the