engineering recuitment NIC NIELIT Scientist B 2023 Mock Test DBMS Transaction Properties of Transaction
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)
|
Time Instance |
Transaction-id |
|
|
T1 |
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) |
|
|
|
Schedule S |
|
Suppose that the transaction T1 fails immediately after time instance 9. Which one of the following statements is correct?
1
T2 must be aborted and then both T1 and T2 must be re-started to ensure transaction atomicity
2
Schedule S is non-recoverable and cannot ensure transaction atomicity
3
Only T2 must be aborted and then re-started to ensure transaction atomicity
4
Schedule S is recoverable and can ensure atomicity and nothing else needs to be done