Transactions and Concurrency · Database Management System · GATE CSE

Start Practice

Marks 1

1

Once the DBMS informs the user that a transaction has been successfully completed, its effect should persist even if the system crashes before all its changes are reflected on disk. This property is called

GATE CSE 2024 Set 2
2

Which of the following statements about the Two Phase Locking (2PL) protocol is/are TRUE?

GATE CSE 2024 Set 2
3

Suppose a database system crashes again while recovering from a previous crash. Assume checkpointing is not done by the database either during the transactions or during recovery.

Which of the following statements is/are correct?

GATE CSE 2021 Set 1
4
Consider the following two statements about database transaction schedules:

I. Strict two-phase locking protocol generates conflict serializable schedules that are also recoverable.

II. Timestamp-ordering concurrency control protocol with Thomas Write Rule can generate view serializable schedules that are not conflict serializable.

Which of the above statements is/are TRUE?
GATE CSE 2019
5
Suppose a database schedule $$S$$ involves transactions $${T_1},\,...,\,{T_n}.$$ Construct the precedence graph of $$S$$ with vertices representing the transactions and edges representing the conflicts. If $$S$$ is serializable, which one of the following orderings of the vertices of the precedence graph is guaranteed to yield a serial schedule?
GATE CSE 2016 Set 2
6
Which one of the following is NOT a part of the $$ACID$$ properties of database transactions?
GATE CSE 2016 Set 1
7
Consider the following transaction involving two bank accounts x and y.
read (x) ; x: = x - 50; write (x); read (y); y: = y + 50;   write (y)

The constraint that the sum of the accounts x and y should remain constant is that of

GATE CSE 2015 Set 2
8
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?

I. 2-phase locking
II. Time-stamp ordering

GATE CSE 2010
9
Amongst the ACID properties of a transaction, the 'Durability' property requires that the changes made to the database by a successful transaction persist
GATE CSE 2005
10
Which level of locking provides the highest degree of concurrency in a relational database?
GATE CSE 2004
11
Which of the following scenarios may lead to an irrecoverable error in a database system?
GATE CSE 2003

Marks 2

1

Consider the following read-write schedule $S$ over three transactions $T_{1}$, $T_{2}$, and $T_{3}$, where the subscripts in the schedule indicate transaction IDs:

$S: r_{1}(z); w_{1}(z); r_{2}(x); r_{3}(y); w_{3}(y); r_{2}(y); w_{2}(x); w_{2}(y);$

Which of the following transaction schedules is/are conflict equivalent to $S$?

GATE CSE 2024 Set 1
2

Let Ri(z) and Wi(z) denote read and write operations on a data element z by a transaction Ti, respectively. Consider the schedule S with four transactions.

S : R4(x), R2(x), R3(x), R1(y), W1(y), W2(x), W3(y), R4(y)

Which one of the following serial schedules is conflict equivalent to S?

GATE CSE 2022
3

Let S be the following schedule of operations of three transactions T1, T2 and T3 in a relational database system:

R2(Y), R1(X), R3(Z), R1(Y), W1(X), R2(Z), W2(Y), R3(X), W3(Z)

Consider the statements P and Q below:

P: S is conflict-serializable.

Q: If T3 commits before T1 finishes, then S is recoverable.

Which one of the following choices is correct?

GATE CSE 2021 Set 2
4

Let ri(z) and wi(z) denote read and write operations respectively on a data item z by a transaction Ti. Consider the following two schedules.

S1 : r1(x) r1(y) r2(x) r2(y) w2(y) w1(x)

S2 : r1(x) r2(x) r2(y) w2(y) r1(y) w1(x)

Which one of the following options is correct?

GATE CSE 2021 Set 1
5
Consider a schedule of transactions T1 and T2 : GATE CSE 2020 Database Management System - Transactions and Concurrency Question 8 English
Here, RX stands for “Read(X)” and WX stands for “Write(X)”. Which one of the following schedules is conflict equivalent to the above schedule?
GATE CSE 2020
6
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?

GATE CSE 2016 Set 2
7
Consider the following two phase locking protocol. Suppose a transaction $$T$$ accesses (for read or write operations), a certain set of objects $$\left\{ {{O_1},...,{O_k}} \right\}.$$ This is done in the following manner:

Step 1. T acquires exclusive locks to $${{O_1},...,{O_k}}$$ in increasing order of their
addresses.
Step 2. The required operations are performed.
Step 3. All locks are released.

This protocol will

GATE CSE 2016 Set 1
8
Consider the following partial Schedule S involving two transactions $$T1$$ and $$T2.$$ Only the read and the write operations have been shown. The read operation on data item $$P$$ is denoted by read$$(P)$$ and the write operation on data item $$P$$ is denoted by write $$(P).$$ GATE CSE 2015 Set 3 Database Management System - Transactions and Concurrency Question 14 English

Suppose that the transaction $$T1$$ fails immediately after time instance $$9.$$ Which one of the following statements is correct?

GATE CSE 2015 Set 3
9
Consider a simple checkpointing protocol and the following set of operations in the log.

(start, $$T4$$); (write, $$T4, y, 2, 3$$); (start, $$T1$$); (commit, $$T4$$); (write, $$T1, z, 5, 7$$);
(checkpoint);
(start, $$T2$$); (write, $$T2, x, 1, 9$$); (commit, $$T2$$); (start, $$T3$$), (write, $$T3, z, 7, 2$$);

If a crash happens now and the system tries to recovver using both undo and redo operations, what are the contents of the undo list and the redo list?

GATE CSE 2015 Set 2
10
Consider the following schedule S of transactions T1, T2, T3, T4: GATE CSE 2014 Set 2 Database Management System - Transactions and Concurrency Question 18 English
GATE CSE 2014 Set 2
11
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 (X) ; r2 (Z) ; w2 (Z)

T3 : r3 (X) ; 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?
GATE CSE 2014 Set 3
12
Consider the following four schedules due to three transactions (indicated by the subscript) using read and write on a data item x, denoted by r(x) and w(x) respectively. Which one of them is conflict serializable?
GATE CSE 2014 Set 1
13
Consider the following transactions with data items P and Q initialized to zero:
T1 : read (P) ; 
     read (Q) ; 
     if P = 0 then Q : = Q + 1 ; 
     write (Q). 
T2 : read (Q) ; 
     read (P) 
     if Q = 0 then P : = P + 1 ; 
     write (P).
Any non-serial interleaving of T1 and T2 for concurrent execution leads to
GATE CSE 2012
14
Consider the following schedule for transactions T1, T2 and T3: GATE CSE 2010 Database Management System - Transactions and Concurrency Question 21 English Which one of the schedules below is the correct serialization of the above?
GATE CSE 2010
15
Consider two transactions T1 and T2 and four schedules S1, S2, S3, S4 of T1 and T2 as given below:

T1: R1[ x ] W1[ x ] W1[ y ]
T2: R2[ x ] R2[ y ] W2[ y ]
S1: R1[ x ] R2[ x ] R2[ y ] W1[ x ] W1[ y ] W2[ y ]
S2: R1[ x ] R2[ x ] R2[ y ] W1[ x ] W2[ y ] W1[ y ]
S3: R1[ x ] W1[ x ] R2[ x ] W1[ y ] R2[ y ] W2[ y ]
S4: R2[ x ] R2[ y ] R1[ x ] W1[ x ] W1[ y ] W2[ y ]

Which of the above schedules are conflict-serializable?
GATE CSE 2009
16
Let R and S be relational schemes such that R = { a, b, c } and S = { c }. Now consider the following queries on the database:

I. $$\pi_{R-S}(r) - \pi_{R-S} \left (\pi_{R-S} (r) \times s - \pi_{R-S,S}(r)\right )$$

II. $$\left\{t \mid t \in \pi_{R-S} (r) \wedge \forall u \in s \left(\exists v \in r \left(u = v[S] \wedge t = v\left[R-S\right]\right )\right )\right\}$$

III.$$\left\{t \mid t \in \pi_{R-S} (r) \wedge \forall v \in r \left(\exists u \in s \left(u = v[S] \wedge t = v\left[R-S\right]\right )\right ) \right\}$$

IV. Select R.a, R.b
    From R, S
    Where R.c = S.c
Which of the above queries are equivalent?
GATE CSE 2009
17
Consider the following three schedules of transactions T1, T2 and T3.
[ Notation: In the following NYO represents the action Y (R for read, W for write) performed by transac­tion N on object O. ]

(S1) 2RA 2WA 3RC 2WB 3WA 3WC 1RA 1RB 1WA 1WB

(S2) 3RC 2RA 2WA 2WB 3WA 1RA 1RB 1WA 1WB 3WC

(S3) 2RZ 3RC 3WA 2WA 2WB 3WC 1RA 1RB 1WA 1WB

Which of the following statements is TRUE?
GATE CSE 2008
18
Consider the following schedules involving two transactions. Which one of the following statements is TRUE?

S1: r1(X); r1(Y); r2(Y); r2(X); w2(Y); w1(X);

S2: r1(X); r2(X); r2(Y); w2(Y); r1(Y); w1(X);

GATE CSE 2007
19
Consider the following two transactions: T1 and T2.
T1: read (A);                  T2: read (B);
    read (B);                      read (A);
    if A = 0 then B ← B + 1;       if B ≠ 0 then A ← A - 1;
    write (B);                     write (A);
Which of the following schemes, using shared and exclusive locks, satisfy the requirements for strict two phase locking for the above transactions?
GATE CSE 2007
20
Consider the following schedule S of transactions T1 and T2: GATE CSE 2004 Database Management System - Transactions and Concurrency Question 27 English Which of the following is TRUE about the schedule S?
GATE CSE 2004
21
Consider three data items D1, D2, and D3, and the following execution schedule of transactions T1, T2, and T3. In the diagram, R(D) and W(D) denote the actions reading and writing the data item D respectively. GATE CSE 2003 Database Management System - Transactions and Concurrency Question 28 English

Which of the following statements is correct?

GATE CSE 2003
22
For the schedule given below, which of the following is correct: GATE CSE 1999 Database Management System - Transactions and Concurrency Question 29 English
GATE CSE 1999
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12