DBMS Topics
Concurrency Control & Serializability
Last Updated : 21 May, 2026
Concurrency control is the mechanism that ensures correct results when multiple transactions execute simultaneously, without interfering with each other.
Concurrency Control
Concurrency control is the mechanism that ensures correct results when multiple transactions execute simultaneously, without interfering with each other.
Schedule
A schedule is a sequence of operations (read/write/commit/abort) from a set of concurrent transactions, where operations from different transactions may be interleaved.
| Transaction T1 | read(A), write(A), read(B), write(B) |
| Transaction T2 | read(A), write(A) |
| T1: read(A) | write(A) → read(B) → write(B) |
| T2: read(A) | write(A) |
| T1: read(A) | write(A) → read(B) → write(B) |
| T2: read(A) | write(A) |
Serial Schedule
A serial schedule is one where transactions execute one after another, with no interleaving.
Serial Schedule (T1 then T2)
T1: r(A) w(A) r(B) w(B)
T2: r(A) w(A)
Serial Schedule (T2 then T1)
T2: r(A) w(A)
T1: r(A) w(A) r(B) w(B)
Serial schedules are always correct — no concurrency issues. But they are slow (no parallelism).
Serializable Schedule
A serializable schedule is a concurrent schedule whose effect is equivalent to some serial schedule.
Serializability allows concurrency while guaranteeing correctness.
Conflict Serializability
Two operations conflict if:
- They belong to different transactions
- They operate on the same data item
- At least one of them is a write
Conflicting pairs on same data item X
r_i(X) and w_j(X) ← read-write conflict
w_i(X) and r_j(X) ← write-read conflict
w_i(X) and w_j(X) ← write-write conflict
Non-conflicting
r_i(X) and r_j(X) ← both reads, no conflict
A schedule is conflict serializable if it can be transformed into a serial schedule by swapping non-conflicting adjacent operations.
Precedence Graph (Serializability Graph)
Used to test conflict serializability:
- Create one node per transaction
- Draw edge Ti → Tj if:
- Ti does r(X) before Tj does w(X), OR
- Ti does w(X) before Tj does r(X), OR
- Ti does w(X) before Tj does w(X)
A schedule is conflict serializable if and only if its precedence graph has NO cycle.
Example
Schedule S
T1: r(A) w(A) r(B) w(B)
T2: r(A) w(A) r(B) w(B)
Conflicts
T1 r(A) before T2 w(A) → T1 → T2
T2 r(A) before T1 w(A) → T2 → T1
Precedence Graph
T1 ──► T2
T2 ──► T1
→ CYCLE! → Schedule is NOT conflict serializable ✗
Another Example
Schedule S
T1: r(A) w(A) r(B) w(B)
T2: r(A) r(B) w(B)
Conflicts
T1 r(A) before T2 (nothing writes A before T2 reads) ← no edge needed for r-r
T1 w(A) after T2 r(A) → T2 → T1
T1 w(B) before T2 w(B) → T1 → T2
Precedence Graph
T2 → T1 → T2? No! T1→T2 and T2→T1 form cycle...
Actually
T2 → T1 (from w(A))
T1 → T2 (from w(B))
→ CYCLE → NOT serializable ✗
View Serializability
A schedule S is view serializable if it is view equivalent to a serial schedule.
Two schedules S and S' are view equivalent if:
- For each data item Q, if Ti reads the initial value of Q in S, then Ti reads the initial value of Q in S' too
- If Ti reads the value of Q written by Tj in S, then Ti reads the value written by Tj in S' too
- For each data item Q, the transaction that performs the final write on Q in S also performs the final write in S'
Why Serializability Matters
| GOAL | Allow concurrent execution for performance |
| Serial execution | Correct but no concurrency (slow) |
| Serializable exec | Correct + concurrent (fast + safe) ✓ |
| Non-serializable | May produce incorrect results ✗ |
Recoverable Schedules
A schedule is recoverable if, for every pair of transactions Ti and Tj where Tj reads a value written by Ti, Ti commits before Tj commits.
Cascadeless (Avoiding Cascading Rollbacks): A transaction reads only committed data — preventing a rollback of one transaction from forcing rollbacks of others.
Strict: A transaction neither reads nor writes a data item until the last transaction that wrote the item has committed.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Concurrency Control & Serializability.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this DBMS topic.
Search Terms
dbms, database management system, database notes, sql, unit, concurrency, control, concurrency control & serializability
Related DBMS Topics