Database Management Systems
SQL & Transactions
GATE 2007
Expert
Consider the following schedules involving two transactions. Which one of the following statements is TRUE?
S1: r1(X); r1(Y); r2(X); r2(Y); w2(Y); w1(X) S2: r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X)
- ABoth S1 and S2 are conflict serializable
- BS1 is conflict serializable and S2 is not conflict serializable
- S1 is not conflict serializable and S2 is conflict serializable
- DBoth S1 and S2 are not conflict serializable
Explanation
S1: r2(X) before w1(X) gives edge T2→T1; r1(Y) before w2(Y) gives edge T1→T2. This is a CYCLE (T1→T2→T1), so S1 is NOT conflict serializable. S2: w2(Y) before r1(Y) gives edge T2→T1; r2(X) before w1(X) gives edge T2→T1 (same direction). No cycle, so S2 IS conflict serializable (serial order T2,T1).
Source: GATE CS 2007 (2007)
This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.