GateAI
Transactions and Concurrency Control

GATE CSE 2016 Set 2 · Q51

MCQ2 marksMedium

Time

Consider the following database schedule with two transactions, T1T_1 and T2T_2. S=r2(X);r1(X);r2(Y);w1(X);r1(Y);w2(X);a1;a2S = r_2(X); r_1(X); r_2(Y); w_1(X); r_1(Y); w_2(X); a_1; a_2 where ri(Z)r_i(Z) denotes a *read* operation by transaction TiT_i on a variable ZZ, wi(Z)w_i(Z) denotes a *write* operation by TiT_i on a variable ZZ and aia_i denotes an *abort* by transaction TiT_i. Which one of the following statements about the above schedule is **TRUE**?

Select one answerSingle correct

Pick an option to check

Solution

Step-by-step verified solution

Official answer: C) S does not have a cascading abort

Transactions and Concurrency Control

Let us analyze the sequence of operations in schedule SS:

  1. r2(X)r_2(X)

  2. r1(X)r_1(X)

  3. r2(Y)r_2(Y)

  4. w1(X)w_1(X)

  5. r1(Y)r_1(Y)

  6. w2(X)w_2(X)

  7. a1a_1

  8. a2a_2

  • Dirty Read Analysis: A dirty read occurs if a transaction reads data written by an uncommitted active transaction (wj(Z)w_j(Z) followed by ri(Z)r_i(Z) where j≠ij \neq i).

    • w1(X)w_1(X) is followed by r1(Y)r_1(Y) (same transaction reads YY) and w2(X)w_2(X) (blind write by T2T_2). No transaction reads the value of XX written by T1T_1.

    • w2(X)w_2(X) is followed only by aborts a1a_1 and a2a_2. No transaction reads the value of XX written by T2T_2.

    • Therefore, there are no dirty reads in SS.

  • Cascading Abort: Since no transaction reads uncommitted data written by another transaction, the abort of T1T_1 (a1a_1) does not force T2T_2 to abort. Hence, SS does not have a cascading abort (it is cascadeless / avoids cascading aborts).

  • Strictness: A schedule is strict if no transaction reads or writes data item ZZ until the transaction that previously wrote ZZ has committed or aborted. Here, w1(X)w_1(X) is overwritten by w2(X)w_2(X) before T1T_1 commits or aborts. Thus, SS is not strict.

Therefore, statement (C) is the only TRUE statement.

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 Q51 of the GATE CSE 2016 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. 12 of them are 2-mark MCQs like this one, and GATE CSE 2016 Set 2 has 2.

How GATE tests Transactions and Concurrency Control

More from GATE CSE 2016 Set 2

Share this solution

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

GateAI solution cardGATE CSE 2016 Set 2 · Q51 · MCQ

Consider the following database schedule with two transactions, T1 and T2. S = r2(X); r1(X); r2(Y); w1(X); r1(Y); w2(X); a1; a2 where ri(Z) denotes a *read* operation by transaction Ti on a variable Z, wi(Z) denotes a *write* operation by Ti on a variable Z and ai denotes an *abort* by transaction Ti. Which one of the following statements about the above schedule 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.