Introduction
Transactions help keep data safe and correct when many people use a database at the same time. They make sure all parts of a task finish together or not at all.
When transferring money between bank accounts to avoid losing or creating money.
When booking a flight and a hotel together to make sure both reservations happen or none.
When updating multiple related records that must stay consistent.
When multiple users are editing data at the same time to prevent conflicts.
When saving a large set of changes that should be treated as one unit.