Consider the database transactions T1 and T2 , and data items X and Y . Which of the schedule(s) is/are conflict serializable?
GATE CSE 2025Databases › Transactions, Concurrency Control & IndexingVerified
GATE CSE 2025 PYQ: Consider the database transactions T1 and T2 , and data items X and Y . Which of the schedule(s) is/are…
- AR1(X), W2(X), W1(Y), W2(Y), R1(X), W1(X), COMMIT(T2), COMMIT(T1)
- BW2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)Correct answer
- CR1(X), W1(Y), W2(X), W2(Y), R1(X), W1(X), COMMIT(T1), COMMIT(T2)
- DW2(X), R1(X), W1(Y), W2(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)
Answer
(B) W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)
Approach
Build a precedence graph for each schedule: add edge Ti → Tj whenever an operation of Ti precedes a conflicting operation of Tj (same data item, at least one write). A schedule is conflict serializable iff this graph has no cycle.
Only option B produces an acyclic precedence graph, so only B is conflict serializable. The community answers agree with this result.
Reviewed by GateIQ Editorial Team: IIT & IISc Alumni.