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?
In a database system, unique timestamps are assigned to each transaction using Lamport's logical clock. Let TS(T_{1}) and TS(T_{2}) be the timestamps of transaction 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.
if TS(T_{2})<TS(T_{1})then
T_{1} is killed
else T_{2} waits.
Assume any transaction that is not killed terminates eventually.Which of the following is TRUE about the database system that uses the above algorithm to prevent deadlock?
Two transaction 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 operation 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 ___________.
Which one of the following is NOT a part of the ACID properties of database transactions?
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:
Step1. T acquires exclusive locks to $ O_1,\;...\;O_k $ in increasing order of their addresses.
Step2. The required operations are performed.
Step3. All locks are released.
This protocol will
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?
Consider the following database schedule with two transactions, $T1$ and $T2$.
$ S=r_2\left(X\right);\;r_1\left(X\right);\;r_2\left(Y\right);\;w_1\left(X\right);\;r_1\left(Y\right);\;w_2\left(X\right);\;a_1;\;a_2 $
where $r_i$(Z) denotes a read operation by transaction $T_i$ on a variable Z, $w_i$(Z) denotes a write operation by $T_i$ on a variable Z and $a_i$ denotes an abort by transaction $T_i$.
Which one of the following statements about the above schedule is TRUE?
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
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 the system tries to recover using both undo and redo operations, what are the contents of the undo list and the redo list?
Consider the following partial Schedule S involving two transactions T1and 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).
Time instance
Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?
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?
Consider the following schedule S of transactions T1, T2, T3, T4:
Writes(X) Commit
Reads(X)
Writes(Y) Reads(Z) Commit
Reads(X) Reads(Y) Commit
Which one of the following statements is CORRECT?
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?
Consider the following transactions with data items P and Q initialized to zero:
T_{1} :read (P); read (Q); if P = 0 then Q := Q + 1 ; write (Q).
T_{2} : read (Q); read (P); if Q = 0 then P := P + 1 ; write (P).
Any non-serial interleaving of T_{1} and T_{2} for concurrent execution leads to
Which of the following concurrency control protocols ensure both conflict serializability and freedom from deadlock?
I. 2-phase locking II. Time-stamp ordering
Consider the following schedule for transactions T1, T2 and T3:
Which one of the schedules below is the correct serialization of the above?
Consider two transactions T_{1} and T_{2}, and four schedules S_{1}, S_{2}, S_{3}, S_{4} of T_{1} and T_{2} as given below:
T_{1} : R_{1} [x] W_{1} [x] W_{1} [y] T_{2} : R_{2} [x] R_{2} [y] W_{2} [y] S_{1} : R_{1} [x] R_{2} [x] R_{2} [y] W_{1} [x] W_{1} [y] W_{2} [y] S_{2} : R_{1} [x] R_{2} [x] R_{2} [y] W_{1} [x] W_{2} [y] W_{1} [y] S_{3} : R_{1} [x] W_{1} [x] R_{2} [x] W_{1} [y] R_{2} [y] W_{2} [y] S_{4} : R_{2} [x] R_{2} [y] R_{1} [x] W_{1} [x] W_{1} [y] W_{2} [y]
Which of the above schedules are conflict-serializable?
Consider the following schedules involving two transactions. Which one of the following statements is TRUE?
S_{1}: r_{1}(X); r_{1}(Y); r_{2}(X); r_{2}(Y); w_{2}(Y); w_{1}(X) S_{2}: r_{1}(X); r_{2}(X); r_{2}(Y); w_{2}(Y); r_{1}(Y); w_{1}(X)