1.6K
In a database, the transaction can be in one of the following states –
The various states of a transaction concept in DBMS are listed below:
State | Description |
Active State | In this state, the transaction is being executed. This is the initial state of every transaction |
Partially Committed | When a transaction executes its final operation, it is said to be in a partially committed state. |
Committed State | If a transaction executes all its operations successfully, it is said to be committed. All its effects are now permanently established on the database system |
Failed State | A transaction considers failed when any one of the checks fails or if the transaction is aborted while it is in the active state. |
Terminated /End State | State of transaction reaches terminated state when certain transactions which are leaving the system can’t be restarted. |
Aborted State | If any of the checks fail and the transaction has reached a failed state then the database recovery system will make sure that the database is in its previous consistent state. If not then it will abort or roll back the transaction to bring the database into a consistent state. |
If any transaction is aborted then, the database recovery module can select one of the two operations –
- Re-start the transaction
- Kill the transaction
This article is contributed by Akash Gain. If you like Techarge and would like to contribute, you can also write an article using https://techarge.in/start-blogging-with-us/ or mail your article to techarge.in@gmail.com . See your article appearing on the Techarge home page and help other to learn. 🙂