Introduction
Isolation says that concurrent transactions must behave as if they ran one at a time. Serializability makes this precise: a schedule is acceptable if it is equivalent to some serial schedule. Two notions of equivalence are used. Conflict equivalence is tested in polynomial time with a precedence graph, and is what locking protocols guarantee. View equivalence is weaker and admits more schedules, but testing it is NP-complete.
The questions to answer about a schedule are whether it is conflict or view serializable, which serial orders it is equivalent to, and how many schedules are conflict equivalent to it.
Prerequisites
- Transactions and the ACID Properties: operations , , , and schedules.
Core concepts
Notation. A schedule is written as a sequence such as . Only reads and writes matter for serializability; commits matter for Recoverability.
Conflicting operations. Two operations conflict if they belong to different transactions, access the same item, and at least one is a write. So -, - and - pairs conflict; - pairs never do. Swapping two adjacent non-conflicting operations of different transactions does not change any read value or the final state.
Conflict equivalence. and are conflict equivalent if they contain the same operations and order every pair of conflicting operations the same way; equivalently, can be reached from by swapping adjacent non-conflicting operations.
Result equivalence, where two schedules merely produce the same final state, is not used: it can hold by accident for particular values (for example, adding then subtracting the same amount) and says nothing about other inputs.
Conflict serializable (CSR). Conflict equivalent to some serial schedule.
Precedence graph : one node per transaction, and an edge whenever an operation of precedes and conflicts with an operation of .
Theorem. is conflict serializable iff is acyclic. The equivalent serial orders are exactly the topological orders of .
View equivalence. and are view equivalent if, for every item :
- the same transaction reads the initial value of in both;
- each read reads the value written by the same write (reads-from) in both;
- the same transaction performs the final write of in both.
View serializable (VSR). View equivalent to some serial schedule. Every CSR schedule is VSR. A VSR schedule that is not CSR always contains a blind write (a write of an item the transaction has not read).
How it works: testing conflict serializability
CSR-TEST(S)
nodes <- transactions of S
for each pair of operations o_i of T_i, o_j of T_j with o_i before o_j in S
if i != j and same item and (o_i or o_j is a write): add edge T_i -> T_j
if the graph has a cycle: S is not conflict serializable
else: every topological order of the graph is an equivalent serial scheduleWith operations the pair scan takes time and cycle detection is linear in the graph size.

Mathematical explanation
Why acyclic implies CSR. Take a topological order and the serial schedule in that order. Every conflicting pair before in gives an edge , so precedes in : every conflicting pair is ordered the same way.
Why a cycle rules it out. A cycle would force before itself in any equivalent serial order.
Why VSR without CSR needs a blind write. For a schedule without blind writes (every write is preceded by a read of the same item in its transaction), view equivalence to a serial schedule implies conflict serializability. This theorem compares a schedule to a serial order; it does not say arbitrary view-equivalent nonserial schedules are conflict equivalent.
Counting conflict-equivalent schedules. Conflict equivalence fixes a partial order on operations: each transaction's own order plus the order of every conflicting pair. The schedules conflict equivalent to are exactly the linear extensions of that partial order, which can be counted by hand for small schedules using binomial coefficients for independent chains.
Worked examples
Example 1: conflict serializable. . Every conflicting pair has the operation first, so has the single edge . is conflict equivalent to and not to .
Example 2: not serializable. , the lost update. before gives ; before gives . Cycle: not CSR. It is not VSR either: in , would read from , and in , would read from , but in both read the initial value.
Example 3: several serial orders (Figure 1). .
- before : ; and before : ; before : .
- and before : ; before : ; before : .
- The graph is acyclic; and are unordered, so the equivalent serial schedules are and .
Example 4: view serializable but not conflict serializable. . Edges: ( before ), ( before ), and , . The cycle means not CSR. View: reads the initial and writes it last, the same as in the serial schedule , and there are no other reads. So is VSR, equivalent only to . The writes of and are blind.
Example 5: counting conflict-equivalent schedules. . All conflicts are on and put before . After the chains and are independent, so they interleave in ways: 6 schedules (including ) are conflict equivalent to . For of Example 3 the same count is 10.
Example 6: a cycle without any write-write conflict. . before gives ; before gives . Cycle: not CSR, even though the transactions never write the same item. No serial order makes both reads see initial values, so it is not VSR either.
Example 7: how many interleavings are CSR? and have interleavings. Only item is shared. If both operations of come before , the schedule is equivalent to : 1 schedule. If both come after , it is equivalent to , and the two operations of interleave freely with : schedules. Any other placement puts one operation of on before a conflicting operation of and the other after, which creates the cycle . So of the 15 interleavings are CSR.
Example 8: a blind write is not enough for VSR. . is blind ( has not read ), and the precedence graph has the cycle , so is not CSR. Check both serial orders for view equivalence:
- : reads from 's own write, but in it reads from . Not equivalent.
- : reads 's write, but in it reads the initial value. Not equivalent.
So is not VSR. A blind write is necessary for "VSR but not CSR", not sufficient: the read after pins the order before on top of the cycle.
Example 9: serial orders are not the same count as equivalent schedules. . The only conflict gives ; touches only .
- Conflict-equivalent serial orders: the topological orders , , , so 3.
- Conflict-equivalent schedules: the operations interleave in ways, and exactly half keep before , so 6 (including ).
"How many serial schedules is it equivalent to" and "how many schedules are equivalent to it" are different questions.
Important properties and observations
- Conflicts: different transactions, same item, at least one write.
- CSR iff the precedence graph is acyclic; serial equivalents are the topological orders.
- CSR is a subset of VSR, and the difference needs blind writes.
- Testing: CSR in polynomial time, VSR NP-complete in general.
- Serial schedules are trivially CSR; there are of them for transactions.
- Number of equivalent serial orders equals the number of topological orders of .
Common misconceptions.
- "Two reads of the same item conflict." They do not.
- "An edge is added only between adjacent operations." Every earlier-later conflicting pair adds an edge.
- "A schedule that is not CSR is not serializable at all." It may still be VSR (Example 4).
- "If is acyclic, is equivalent to exactly one serial schedule." It is equivalent to every topological order (Example 3).
GATE examination perspective
- Draw the precedence graph. Decide CSR, and list equivalent serial orders.
- View serializability. Apply this to schedules with blind writes.
- Count. Schedules conflict equivalent to a given one, or all CSR schedules of two short transactions.
- Combine. Combine this with Recoverability: a schedule can be CSR but not recoverable, or the reverse.
- Protocols. Lock-Based Concurrency Control produces only CSR schedules.
Summary
Sources
- A. Silberschatz, H. F. Korth, S. Sudarshan, Database System Concepts, 7th ed., McGraw-Hill, 2019 (2020 copyright), 17.6 Serializability.
- R. Elmasri, S. B. Navathe, Fundamentals of Database Systems, 7th ed., Pearson, 20.5 Characterizing Schedules Based on Serializability.