2. 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.
3. 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.
4. 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.
5. 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.
6. Thus the possible sequence of states are:
Active -> Partially committed -> Committed
Active -> Partially committed -> Aborted
Active -> Failed -> Aborted