GateAI
Transactions and Concurrency Control

GATE CSE 2025 Set 2 · Q53

MSQ2 marksMedium

Time

Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable?

GATE CSE 2025 Set 2 Q53 diagram

Select all that applyOne or more correct

Pick every correct option

Solution

Step-by-step verified solution

Official answer: B) W2(X), R1(X), W2(Y), W1(Y), R1(X), COMMIT(T2), W1(X), COMMIT(T1)

Transactions and Concurrency Control

To determine whether a schedule is conflict serializable, we construct the precedence (serializability) graph for each schedule:

  1. Option (A):

    R1(X),W2(X),W1(Y),W2(Y),R1(X),W1(X),COMMIT(T2),COMMIT(T1)\text{R}_1(X), \text{W}_2(X), \text{W}_1(Y), \text{W}_2(Y), \text{R}_1(X), \text{W}_1(X), \text{COMMIT}(T2), \text{COMMIT}(T1)
    • R1(X)\text{R}_1(X) occurs before W2(X)  ⟹  T1→T2\text{W}_2(X) \implies T_1 \to T_2

    • W2(X)\text{W}_2(X) occurs before R1(X)\text{R}_1(X) and W1(X)  ⟹  T2→T1\text{W}_1(X) \implies T_2 \to T_1

    • There is a cycle (T1→T2→T1T_1 \to T_2 \to T_1), so the schedule is not conflict serializable.

  2. Option (B):

    W2(X),R1(X),W2(Y),W1(Y),R1(X),COMMIT(T2),W1(X),COMMIT(T1)\text{W}_2(X), \text{R}_1(X), \text{W}_2(Y), \text{W}_1(Y), \text{R}_1(X), \text{COMMIT}(T2), \text{W}_1(X), \text{COMMIT}(T1)
    • W2(X)\text{W}_2(X) occurs before R1(X)\text{R}_1(X) and W1(X)  ⟹  T2→T1\text{W}_1(X) \implies T_2 \to T_1

    • W2(Y)\text{W}_2(Y) occurs before W1(Y)  ⟹  T2→T1\text{W}_1(Y) \implies T_2 \to T_1

    • There is no conflicting pair where T1T_1 precedes T2T_2. The graph has only the edge T2→T1T_2 \to T_1, which is acyclic. Thus, this schedule is conflict serializable.

  3. Option (C):

    R1(X),W1(Y),W2(X),W2(Y),R1(X),W1(X),COMMIT(T1),COMMIT(T2)\text{R}_1(X), \text{W}_1(Y), \text{W}_2(X), \text{W}_2(Y), \text{R}_1(X), \text{W}_1(X), \text{COMMIT}(T1), \text{COMMIT}(T2)
    • R1(X)\text{R}_1(X) occurs before W2(X)  ⟹  T1→T2\text{W}_2(X) \implies T_1 \to T_2

    • W2(X)\text{W}_2(X) occurs before R1(X)\text{R}_1(X) and W1(X)  ⟹  T2→T1\text{W}_1(X) \implies T_2 \to T_1

    • There is a cycle (T1→T2→T1T_1 \to T_2 \to T_1), so the schedule is not conflict serializable.

  4. Option (D):

    W2(X),R1(X),W1(Y),W2(Y),R1(X),COMMIT(T2),W1(X),COMMIT(T1)\text{W}_2(X), \text{R}_1(X), \text{W}_1(Y), \text{W}_2(Y), \text{R}_1(X), \text{COMMIT}(T2), \text{W}_1(X), \text{COMMIT}(T1)
    • W2(X)\text{W}_2(X) occurs before R1(X)\text{R}_1(X) and W1(X)  ⟹  T2→T1\text{W}_1(X) \implies T_2 \to T_1

    • W1(Y)\text{W}_1(Y) occurs before W2(Y)  ⟹  T1→T2\text{W}_2(Y) \implies T_1 \to T_2

    • There is a cycle (T1→T2→T1T_1 \to T_2 \to T_1), so the schedule is not conflict serializable.

Hence, only option (B) is conflict serializable.

Try the question first, then check your work.

Think the official key or this write-up is wrong?

Report error or challenge

Examiner trap

The misconception this question tests

This Transactions and Concurrency Control previous year question is Q53 of the GATE CSE 2025 Set 2 paper. Find more GATE CSE PYQs on Transactions and Concurrency Control in Databases, or browse all GATE CSE PYQs.

Free diagnostic

Where do you stand for GATE?

Take the 20-minute diagnostic: the 3 topics that cost you the most marks, and a rank range. Or sit 5 related Transactions and Concurrency Control PYQs now with no account.

One GATE CSE PYQ every morning

An official question by email at 7 AM IST, with a link to its verified solution. Unsubscribe in one click.

Transactions and Concurrency Control in GATE CSE

Transactions and Concurrency Control has 25 GATE CSE PYQs across 20 papers from 2012 to 2026. 2 of them are 2-mark MSQs like this one, and GATE CSE 2025 Set 2 has 2.

How GATE tests Transactions and Concurrency Control

More from GATE CSE 2025 Set 2

Share this solution

A plain-text card for WhatsApp or Telegram study groups.

GateAI solution cardGATE CSE 2025 Set 2 · Q53 · MSQ

Consider the database transactions T1 and T2, and data items X and Y. Which of the schedule(s) is/are conflict serializable?

Topic-wise GATE CS PYQs with verified steps

Independent practice explanation verified by the GateAI team. GATE is conducted by the IITs; question text follows the official paper.