GATE CS 2015, set 3 · Question 51 · Databases · Multiple choice (MCQ) · 2 marks · −2/3 for a wrong answer
Consider the following partial Schedule S involving two transactions T1 and 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).
Schedule S
Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?
| Time instance | Transaction-id T1 | Transaction-id T2 |
|---|---|---|
| 1 | read(A) | |
| 2 | write(A) | |
| 3 | read(C) | |
| 4 | write(C) | |
| 5 | read(B) | |
| 6 | write(B) | |
| 7 | read(A) | |
| 8 | commit | |
| 9 | read(B) |
- (A) T2 must be aborted and then both T1 and T2 must be re-started to ensure transaction atomicity
- (B) Schedule S is non-recoverable and cannot ensure transaction atomicity
- (C) Only T2 must be aborted and then re-started to ensure transaction atomicity
- (D) Schedule S is recoverable and can ensure atomicity and nothing else needs to be done
Answer
Answer (B)
Answer from the official GATE CS 2015 answer key.
The step-by-step solution, where available, is part of GATE CS Pro. See what Pro includes