# Transaction

 Question 1
Let $R_i(z)$ and $W_i(z)$ denote read and write operations on a data element $z$ by a transaction $T_i$, respectively. Consider the schedule $S$ with four transactions.

S: $R_4(x)R_2(x)R_3(x)R_1(y)W_1(y)W_2 (x)W_3 (y)R_4(y)$

Which one of the following serial schedules is conflict equivalent to $S$?
 A $T_1\rightarrow T_3\rightarrow T_4\rightarrow T_2$ B $T_1\rightarrow T_4\rightarrow T_3\rightarrow T_2$ C $T_4\rightarrow T_1\rightarrow T_3\rightarrow T_2$ D $T_3\rightarrow T_1\rightarrow T_4\rightarrow T_2$
GATE CSE 2022   Database Management System
Question 1 Explanation:
 Question 2
Let S be the following schedule of operations of three transactions $T_1, T_2 \text{ and }T_3$ in a relational database system:

$R_2(Y), R_1(X), R_3(Z), R_1(Y)W_1(X), R_2(Z), W_2(Y), R_3(X), W_3(Z)$

Consider the statements P and Q below:

P: S is conflict-serializable.
Q: If $T_3$ commits before $T_1$ finishes, then S is recoverable.

Which one of the following choices is correct?
 A Both P and Q are true B P is true and Q is false C P is false and Q is true D Both P and Q are false
GATE CSE 2021 SET-2   Database Management System
Question 2 Explanation:
 Question 3
Let $r_i(z)$ and $w_i(z)$ denote read and write operations respectively on a data item $z$ by a transaction $T_i$. Consider the following two schedules.

$S1: r_1(x)r_1(y)r_2(x)r_2(y)w_2(y)w_1(x)$
$S2: r_1(x)r_2(x)r_2(y)w_2(y)r_1(y)w_1(x)$

Which one of the following options is correct?
 A S1 is conflict serializable, and S2 is not conflict serializable B S1 is not conflict serializable, and S2 is conflict serializable C Both S1 and S2 are conflict serializable D Niether S1 nor S2 is conflict serializable
GATE CSE 2021 SET-1   Database Management System
Question 3 Explanation:
 Question 4
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?
 A The same undo and redo list will be used while recovering again B The system cannot recover any further C All the transactions that are already undone and redone will not be recovered again D The database will become inconsistent
GATE CSE 2021 SET-1   Database Management System
Question 4 Explanation:
 Question 5
Consider a schedule of transactions T1 and T2:

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?
 A A B B C C D D
GATE CSE 2020   Database Management System
Question 5 Explanation:
 Question 6
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?
 A I only B II only C Both I and II D Neither I nor II
GATE CSE 2019   Database Management System
Question 6 Explanation:
 Question 7
Let us assume that transaction T1 has arrived before transaction T2. Consider the schedule s=r1(A);r2(B):w2(A);w1(B)
Which of the following is true?
 A Allowed under basic timestamp protocol. B Not allowed under basic timestamp protocols because T1 is rolled back. C Not allowed under basic timestamp protocols because T2 is rolled back. D None of these
ISRO CSE 2018   Database Management System
Question 7 Explanation:
 Question 8
ACID properties of a transactions are
 A Atomicity, consistency, isolation, database B Atomicity, consistency, isolation, durability C Atomicity, consistency, integrity, durability D Atomicity, consistency, integrity, database
ISRO CSE 2017   Database Management System
Question 8 Explanation:
 Question 9
Which of the following concurrency control protocol ensures both conflict and free from deadlock? ,
 A Time stamp ordering B 2 Phase locking C Both (A) and (B) D None of the above
ISRO CSE 2017   Database Management System
Question 9 Explanation:
 Question 10
Two transactions $T_1 \; and \; T_2$ are given as:

$T_{1}:r_{1} (X)w_{1}(X)r_{1}(Y)w_{1}(Y)$
$T_{2}:r_{2}(Y)w_{2}(Y)r_{2}(Z)w_{2}(Z)$

where $r_{i}(V)$ denotes a read operation by transaction $T_{i}$ on a variable V and $w_{i}(V)$ denotes a write operations by transaction $T_{i}$ on a variable V. The total number of conflict serializable schedules that can be formed by $T_1 \; and \; T_2$ is _____________.
 A 53 B 54 C 70 D 12
GATE CSE 2017 SET-2   Database Management System
Question 10 Explanation:
There are 10 questions to complete.

### 6 thoughts on “Transaction”

1. Question 34 of transaction misprinted

• Thanks for your suggestion. We have corrected Question 34.

2. question 21, option b please correct

• Thank You Suman Maity,
We have updated the option.

3. Please add DARK MODE😎. It will be very helpful.

• Thank You Hrishikesh Roy,
We will consider this update.