Transaction states with worked example

December 4, 2026 · Team EasyExamNotes · 2 min read (est.) · 0 comments

Share on WhatsApp

← 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

Transaction states with worked example
Transaction states with worked example
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.

  1. Active: The transaction executes reads, calculations and writes. For example, with A=1000 and B=500, t=900 and the local B becomes 1400.
  2. Partially committed: The final write has executed, but durable commit has not yet been guaranteed. A crash can still require rollback.
  3. Committed: The commit is made durable according to the recovery protocol. Its effects survive a crash.
  4. Failed: An error, crash or deadlock prevents normal completion. The transaction cannot continue.
  5. Aborted: Recovery undoes uncommitted effects, restoring the prior logical state. The transaction may restart or terminate.
  6. 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.

← RGPV CS-502 DBMS November 2022 solved question paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion