GateAI
Transactions and Concurrency Control

GATE CSE 2014 Set 3 · Q29

MCQ2 marksMedium

Time

Consider the transactions T1, T2, and T3 and the schedules S1 and S2 given below. T1: r1(X); r1(Z); w1(X); w1(Z)T2: r2(Y); r2(Z); w2(Z)T3: r3(Y); r3(X); w3(Y)S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z)S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z)

Which one of the following statements about the schedules is TRUE?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: A) Only S1 is conflict-serializable.

Transactions and Concurrency Control

To check conflict serializability, we construct the precedence graph for each schedule:

For Schedule S1:

  • Conflict on XX: r3(X)r_3(X) is followed by w1(X)  ⟹  T3→T1w_1(X) \implies T_3 \to T_1

  • Conflict on YY: r2(Y)r_2(Y) is followed by w3(Y)  ⟹  T2→T3w_3(Y) \implies T_2 \to T_3

  • Conflict on ZZ: w2(Z)w_2(Z) is followed by r1(Z)r_1(Z) and w1(Z)  ⟹  T2→T1w_1(Z) \implies T_2 \to T_1

The precedence graph has edges T2→T3→T1T_2 \to T_3 \to T_1 and T2→T1T_2 \to T_1, which is acyclic. Therefore, S1 is conflict-serializable.

For Schedule S2:

  • Conflict on XX: r3(X)r_3(X) is followed by w1(X)  ⟹  T3→T1w_1(X) \implies T_3 \to T_1

  • Conflict on YY: r2(Y)r_2(Y) is followed by w3(Y)  ⟹  T2→T3w_3(Y) \implies T_2 \to T_3

  • Conflict on ZZ:

    • r1(Z)r_1(Z) appears before w2(Z)  ⟹  T1→T2w_2(Z) \implies T_1 \to T_2

    • w2(Z)w_2(Z) appears before w1(Z)  ⟹  T2→T1w_1(Z) \implies T_2 \to T_1

This creates a cycle (T1→T2→T1T_1 \to T_2 \to T_1). Therefore, S2 is not conflict-serializable.

Hence, only S1 is conflict-serializable (A).

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 Q29 of the GATE CSE 2014 Set 3 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. 12 of them are 2-mark MCQs like this one, and it is the only one in GATE CSE 2014 Set 3.

How GATE tests Transactions and Concurrency Control

More from GATE CSE 2014 Set 3

Share this solution

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

GateAI solution cardGATE CSE 2014 Set 3 · Q29 · MCQ

Consider the transactions T1 , T2 , and T3 and the schedules S1 and S2 given below. T1: r1(X); r1(Z); w1(X); w1(Z) T2: r2(Y); r2(Z); w2(Z) T3: r3(Y); r3(X); w3(Y) S1: r1(X); r3(Y); r3(X); r2(Y); r2(Z); w3(Y); w2(Z); r1(Z); w1(X); w1(Z) S2: r1(X); r3(Y); r2(Y); r3(X); r1(Z); r2(Z); w3(Y); w1(X); w2(Z); w1(Z) Which one of the following statements about the schedules is TRUE?

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.