Databases
Transaction
A sequence of operations that either all succeed (commit) or all fail (rollback), guaranteeing that the database moves from one consistent state to another.
Transactions provide the ACID guarantees: atomicity (all or nothing), consistency (constraints hold), isolation (concurrent transactions do not interfere in ways the isolation level forbids), and durability (committed data survives a crash). Long-running transactions hold locks and prevent vacuum from reclaiming dead rows, so keeping them short is a practical requirement, not just a recommendation.