The following diagram shows the stages in the progress of each transaction:
The newly started transaction will progress through the following stages:
- Active: The transaction has just started and is progressing ahead.
- Partially committed: Once the operation is performed successfully, the generated values during it will be stored in the volatile storage.
- Failed: The values generated before the failure are no longer required and will be removed from the volatile storage area. The process of removing them is generally called rollback.
- Aborted: The operation is failed and is no longer continued further; it will be stopped or aborted.
- Committed: All the operations are successfully performed, and all the temporary values generated during the operation will be stored permanently once the transaction is committed.
- Terminated: When the transaction is committed or aborted, it reaches to its final stage: the termination.
To handle transaction along with life cycle steps and properties, one cannot neglect a very important fact: to know the types of transactions. A transaction can be divided into either local or global transactions.