Transactions
Q22.
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 recover using both undo and redo operations, what are the contents of the undo list and the redo list?Q24.
Consider the following log sequence of two transactions on a bank account, with initial balance 12000, that transfer 2000 to a mortgage payment and then apply a 5% interest.1.T1 start 2.T1 B old =1200 new =100003.T1 M old =0 new =20004.T1 commit5.T2 start6.T2 B old =10000 new =105007.T2 commitSuppose the database system crashes just before log record 7 is written. When the system is restarted, which one statement is true of the recovery procedure?Q25.
Consider the following schedule S of transactions T1, T2, T3, T4: Which one of the following statements is CORRECT?Q26.
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 toQ27.
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?Q28.
Consider the following four schedules due to three transactions (indicted 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?Q29.
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 ofQ30.
Consider the following databases chedule with two transactions, T1 and T2. S=r_{2}(X);r_{1}(X);r_{2}(Y);w_{1}(X);r_{1}(Y);w_{2}(X);a_{1};a_{2} where r_{i}(Z) denotes a read operation by transaction T_{i} on avariable Z, w_{i}(Z) denotes a write operation by T_{i} on avariable Z and a_{i} denotes an abort by transaction T_{i}. Which one of the following statements about the above schedule is TRUE?