Transaction

Question 1
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
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
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
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
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
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
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
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
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
In a database system, unique time stamps are assigned to each transaction using Lamport's logical clock . Let TS(T_{1}) and TS(T_{2}) be the timestamps of transactions T_{1} and T_{2} respectively. Besides, T_{1} holds a lock on the resource R, and T_{2} has requested a conflicting lock on the same resource R. The following algorithm is used to prevent deadlocks in the database system assuming that a killed transaction is restarted with the same timestamp.

Assume any transactions that is not killed terminates eventually. Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlocks?
A
The database system is both deadlock-free and starvation- free.
B
The database system is deadlock- free, but not starvation-free.
C
The database system is starvation-free but not deadlock- free.
D
The database system is neither deadlock- free nor starvation-free.
GATE CSE 2017 SET-1   Database Management System
There are 10 questions to complete.

6 thoughts on “Transaction”

Leave a Comment

Like this FREE website? Please share it among all your friends and join the campaign of FREE Education to ALL.