0% found this document useful (0 votes)
13 views1 page

The Five States of Transactions: Active: Partially Committed

Uploaded by

Qurtiss Mayfield
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views1 page

The Five States of Transactions: Active: Partially Committed

Uploaded by

Qurtiss Mayfield
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

The Five States of Transactions

Transactions in a database system typically go through five states:

1. Active: A transaction is initiated and is currently executing its operations (Silberschatz et


al., 2001).
2. Partially Committed: The transaction has completed all its operations successfully but
has not yet been committed. It is at this stage that the system checks for conflicts with
other transactions and decides whether to commit or abort the transaction (Silberschatz et
al., 2001).
3. Committed: The transaction has been successfully committed and its changes are now
permanent in the database (Silberschatz et al., 2001).
4. Aborted: The transaction has been terminated due to an error or conflict with another
transaction. The system will undo any changes made by the transaction (Silberschatz et
al., 2001).
5. Failed: The transaction has encountered an error and is unable to proceed. It may be
aborted or restarted depending on the nature of the error (Silberschatz et al., 2001).

Example: Bank Transfer

Consider a bank transfer transaction that involves transferring money from one account to
another.

Active: The transaction starts when a user initiates the transfer, specifying the source and
destination accounts, and the amount to be transferred.

Partially Committed: The system updates the source account by deducting the transfer amount.
At this stage, the transaction is partially committed. If an error occurs or a conflict arises, the
system can roll back the changes to the source account.

Committed: The system updates the destination account by adding the transferred amount. If
both updates are successful, the transaction is committed, and the money has been transferred
successfully.

Aborted: If an error occurs during the transaction, such as insufficient funds in the source
account or a system failure, the transaction will be aborted. The system will undo the changes
made to the source account, ensuring that the original balance is restored.

Failed: If the transaction encounters a critical error that cannot be recovered, it is considered
failed. In this case, the system may attempt to restart the transaction or notify the user of the
failure.

References:

 Silberschatz, A., Korth, H.F., & Sudarshan, S. (2001). Database System Concepts (4th
ed.). New York, NY: McGraw-Hill.

You might also like