Transaction

Problem

A bank transfer performs: Alice -€100 Bob +€100 The server crashes after the first update. Money has disappeared.

Solution — Transaction

Group related changes into one unit: BEGIN Alice -100 Bob +100 COMMIT Either the transaction commits or its changes don't become the completed operation.
Core idea: transactions make related database changes behave as one logical unit.