CS FundamentalsHardGATE CS (PYQ pattern)

Consider the schedule S: r1(A) r3(B) r2(C) w2(A) r4(C) w4(B) r1(D) r3(D), where ri/wi is a read/write by transaction Ti. How many distinct serial schedules of T1..T4 are conflict equivalent to S?

  1. A. 6
  2. B. 3
  3. C. 4
  4. D. 2

Correct answer: A. 6

Only conflicting pairs of operations on the same item count: r1(A) before w2(A) gives T1 → T2, and r3(B) before w4(B) gives T3 → T4. Reads r2(C), r4(C), r1(D), r3(D) never conflict, so two chains of two give 4!/(2!·2!) = 6 serial orders.

More DBMS and SQL questions

Exams that ask this topic