Transaction States Pondicherry University School of Engineering & Technology Dept :- Computer Science [MCA] BY :Ravi Ranjan Reg.No . -13352223 MCA-II year (2013-16)
Because failures occurs, transaction are broken up into states to handle various situation . Active , the initial state; the transaction stays in this state until while it is still executing. A transition is terminated only if it has either been committed or aborted . Transaction States
The DBMS needs to write out enough information to disk so that, in case of a failure, the system could re-create the updates performed by the transaction once the system is brought back up. After it has written out all the necessary information, it is committed . Trasaction States
Committed - after successful completion. Once committed, the transaction can no longer be undone by aborting it. Its effect could be undone only by a compensating transaction . Trasaction States
Aborted , after the transaction has been rolled back the the database has been restored to its state prior to the start of the transaction. The DBMS could either kill the transaction or restart the transaction. A transaction may only be restarted as a result of some hardware or software error, and a restarted transaction is considered a new transaction. Transaction States
Thus the possible sequence of states are: Active -> Partially committed -> Committed Active -> Partially committed -> Aborted Active -> Failed -> Aborted Transcation States