Question 1
Consider the following schedule for transactions T1, T2 and T3:
Which one of the schedules below is the correct serialization of the above?
T1->>T3->>T2
T2->>T1->>T3
T2->>T3->>T1
T3->>T1->>T2
Question 2
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.
A
B
C
D
Question 3
Consider the following schedule S of transactions T1, T2, T3, T4:
Which one of the following statements is CORRECT?
S is conflict-serializable but not recoverable
S is not conflict-serializable but is recoverable
S is both conflict-serializable and recoverable
S is neither conflict-serializable nor is it recoverable
Question 4
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?
Only S1 is conflict-serializable.
Only S2 is conflict-serializable.
Both S1 and S2 are conflict-serializable.
Neither S1 nor S2 is conflict-serializable.
Question 5
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=12000 new=10000
3. T1 M old=0 new=2000
4. T1 commit
5. T2 start
6. T2 B old=10000 new=10500
7. T2 commit
Suppose 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?
We must redo log record 6 to set B to 10500
We must undo log record 6 to set B to 10000 and then redo log records 2 and 3.
We need not redo log records 2 and 3 because transaction T1 has committed.
We can apply redo and undo operations in arbitrary order because they are idempotent
Question 6
S = T1:R(x), T1:R(y), T1:W(x), T2:R(y), T3:W(y), T1:W(x), T2:R(y)
Question 7
Which of the following scenarios may lead to an irrecoverable error in a database system ?
A transaction writes a data item after it is read by an uncommitted transaction
A transaction reads a data item after it is read by an uncommitted transaction
A transaction reads a data item after it is written by a committed transaction
A transaction reads a data item after it is written by an uncommitted transaction
Question 8
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.
Which of the following statements is correct?
The schedule is serializable as T2; T3; T1
The schedule is serializable as T2; T1; T3
The schedule is serializable as T3; T2; T1
The schedule is not serializable
Question 9
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
Atomicity
Consistency
Isolation
Durability
Question 10
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
Undo: T3, T1; Redo: T2
Undo: T3, T1; Redo: T2, T4
Undo: none; Redo: T2, T4, T3; T1
Undo: T3, T1, T4; Redo: T2
There are 48 questions to complete.