P

PrepStack

Transactions

A transaction is a group of operations that the database treats as one unit: all of it happens or none of it does. Interviewers ask about transactions because ACID (four safety guarantees), schedules (the order in which operations run) and serializability (the result matches running them one by one) test whether you understand what can go wrong when programs fail or run at the same time. After this section you can explain ACID with a bank transfer, draw the states a transaction passes through, check whether a schedule is conflict serializable using a precedence graph, and say what recoverable and cascadeless mean.

Topics in this section