CS FundamentalsVery hardProduct company interview · GATE level

Consider the schedule R1(A); W2(A); W2(B); W1(A); W1(B); W3(A); W3(B). Which statement is correct?

  1. A. It is conflict serializable, equivalent to the serial order T1, T2, T3
  2. B. It is not conflict serializable, but it is view serializable, equivalent only to the serial order T1, T2, T3
  3. C. It is not conflict serializable, but it is view serializable, equivalent to both T1, T2, T3 and T2, T1, T3
  4. D. It is neither conflict serializable nor view serializable

Correct answer: B. It is not conflict serializable, but it is view serializable, equivalent only to the serial order T1, T2, T3

R1(A) before W2(A) gives T1 → T2, while W2(A) before W1(A) gives T2 → T1: a cycle, so the schedule is not conflict serializable. For view equivalence only three things matter: T1's read of A must see the initial value, and the final writes of A and B must both come from T3. The serial order T1, T2, T3 satisfies all three. In T2, T1, T3 the read R1(A) would see T2's value instead of the initial one, so that order is not view equivalent, and any order with T3 not last changes the final writes. The writes of T2 and T1 are overwritten by T3's blind writes, which is what makes view serializability possible here.

More DBMS and SQL questions

Exams that ask this topic