If transaction 1 terminates abnormally, it rolls back its own creation (data A), and the subsequent transactions are not executed either, so no data remains at all. This does not match the result where data A and data B remain.
×Incorrectイ
If transaction 2 terminates abnormally, only up through transaction 1 has been committed, so only data A remains. Data B has not yet been created, so the result is not one where both remain.
×Incorrectウ
If transaction 3 terminates abnormally, only up through transaction 2 has been committed, at which point data A has been deleted and only data B remains. Transaction 3's re-creation of data A is also rolled back, so only data B remains and not both.
○エ
正解The result of a transaction whose commit completed normally is finalized and remains, while a transaction that terminated abnormally rolls back and undoes its own changes, and the transactions after it are not executed. Therefore the data that finally remains matches the committed state up to just before the transaction that terminated abnormally. Tracing the state at each commit point: after transaction 1 it is “A”, after transaction 2 it is “B” (A is deleted), after transaction 3 it is “A and B” (A is re-created), after transaction 4 it is “A” (B is deleted). Data A and data B both remain only when transactions up through transaction 3 have been committed and transaction 4 terminates abnormally and rolls back (undoing the deletion of data B). Therefore the correct answer is エ (transaction 4).
ここがポイント
The result of a committed transaction is finalized and remains, while a transaction that terminated abnormally rolls back and undoes its own changes. Transactions after the abnormal termination are not executed.
The data that finally remains = the committed state up to just before the transaction that terminated abnormally. Trace the state at each commit point in order and work backward to the point where it becomes “A and B” to identify the transaction that terminated abnormally.