← RGPV CS-502 DBMS November 2022 solved question paper
RGPV CS-502 (GS) | November 2022 | Q6(a) | 7 marks
Question (restated): Explain active, partially committed, committed, failed and terminated states for the supplied transaction reading A and B, computing t=A−10% of A, adding t to B and writing A and B.
Answer

BEGIN Read(A); Read(B); t = A - 0.10*A; B = B + t; Write(A); Write(B); COMMIT;
A transaction is a logical unit of work that must satisfy atomicity, consistency, isolation and durability. Its state changes as instructions execute and the recovery system records their effects.
- Active: The transaction executes reads, calculations and writes. For example, with A=1000 and B=500, t=900 and the local B becomes 1400.
- Partially committed: The final write has executed, but durable commit has not yet been guaranteed. A crash can still require rollback.
- Committed: The commit is made durable according to the recovery protocol. Its effects survive a crash.
- Failed: An error, crash or deadlock prevents normal completion. The transaction cannot continue.
- Aborted: Recovery undoes uncommitted effects, restoring the prior logical state. The transaction may restart or terminate.
- Terminated: The transaction leaves the system after successful commit or completed abort and releases resources.
The printed algorithm does not assign a new value to A before Write(A). Therefore A remains 1000 in the example; it is not a correct money-transfer algorithm as written. If the intention were to transfer t, an additional A=A−t would be required. This distinction does not alter the transaction-state analysis.
Further reading: Silberschatz, Korth and Sudarshan, Database System Concepts.
Discussion
Ask a question, share your thoughts or report an error.
Sign in to participate in the discussion.
Join the discussion