GATE / CS ARCHIVE

GATE CSE 2003 / QUESTION 87

Serializability of a three-transaction schedule

Database Management Systems · Transactions & Concurrency Control · Full GATE CSE 2003 paper

GATE 2003, Q87 2 marks · MCQ
Report issue

Transactions & Concurrency Control

Question 87, GATE 2003: Three transactions act on D1,D2,D3. In chronological order the printed schedule is:
R2(D3), R2(D2), W2(D2), R3(D2), R3(D3), R1(D1), W1(D1), W3(D2), W3(D3), R2(D1), R1(D2), W1(D2), W2(D1).
Ri(D) and Wi(D) denote transaction Ti reading/writing D. Which is correct?
A. Serializable as T2,T3,T1
B. Serializable as T2,T1,T3
C. Serializable as T3,T2,T1
D. Not serializable
Tap to enlarge
Your answer
Answer & solution

Answer: D (no official key was published)

Step through it (15 steps)

1. On D1, T1 writes before T2 reads and writes, forcing edge T1→T2 in the conflict graph.
2. On D2, T2 writes before T3 reads/writes, forcing T2→T3; T3 writes before T1 reads/writes, forcing T3→T1. These edges already form T1→T2→T3→T1.
3. A directed cycle means no serial ordering can preserve all conflicts, so the schedule is not conflict-serializable.
4. Even view equivalence cannot rescue it: T2's D2 read is initial, T3 reads T2's D2 write, T1 reads T3's D2 write, and T2 reads T1's D1 write. Preserving these reads requires T2<T3<T1<T2, impossible. Therefore D holds even under the broader view-serializability interpretation.

Solution: On D1, T1 writes before T2 reads/writes, imposing T1→T2. On D2, T2 writes before T3 reads/writes, and T3 writes before T1 reads/writes, imposing T2→T3→T1. This cycle rules out conflict serializability, so D. It also rules out view serializability here: T2 reads the initial D2 value, T3 reads T2's D2 value, T1 reads T3's D2 value, and T2 reads T1's D1 value. Any view-equivalent serial order would need T2 before T3 before T1 before T2, which is impossible.

Original paper, page 13