All mock tests are FREE till 31 December — register to save your progress
Unit 4 · Database Management Systems Paper 2 CS · June 2024 Re-Exam

Consider the transactions T1, T2, T3 and the schedules S1 and S2 given below.
T1: r1(x); r1(z); w1(z)
T2: r2(y); r2(z); w2(z)
T3: r3(y); r3(x); w3(y)
S1: r1(x); r3(y); r3(x); r2(y); r2(z); w3(y); w2(z); r1(z); w1(x); w1(z)
S2: r1(x); r3(y); r2(y); r3(x); r1(z); r2(z); w3(y); w1(x); w2(z); w1(z)
Which one of the following statements about the schedules is TRUE?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: A. Only S1 is conflict-serializable

Explanation

S1: r3(x) before w1(x) gives T3→T1; r2(y) before w3(y) gives T2→T3; r2(z)/w2(z) before r1(z)/w1(z) gives T2→T1. The graph T2→T3→T1 is acyclic, so S1 is serializable. S2: r1(z) before w2(z) gives T1→T2, and r2(z) before w1(z) gives T2→T1, a cycle. So only S1 is conflict-serializable.

More Database Management Systems questions