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 instanceTransaction-id T1Transaction-id T2
1read(A)
2write(A)
3read(C)
4write(C)
5read(B)
6write(B)
7read(A)
8commit
9read(B)
  1. (A) T2 must be aborted and then both T1 and T2 must be re-started to ensure transaction atomicity
  2. (B) Schedule S is non-recoverable and cannot ensure transaction atomicity
  3. (C) Only T2 must be aborted and then re-started to ensure transaction atomicity
  4. (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