Database Reference
In-Depth Information
BEGIN
END
PARTIALLY
COMMITTED
ACTIVE
READ
WRITE
FAILED
COMMITTED
TERMINATED
Figure 15-3
Operations and states of a transaction.
END
Indicates end of transaction read or write operations.
Transaction proceeds to
partially committed
state.
COMMIT
Signifies successful end of transaction so that any database
updates can be safely confirmed or committed to the database.
Updates cannot be undone.
Transaction moves to
committed
state and finally reaches the
terminated
state.
ABORT
Indicates failure of transaction so that effects of any database
updates must be undone.
Transaction proceeds to
failed
state from either
active
state
or
partially committed
state depending on the nature of the
failure.
ROLLBACK
Indicates that the recovery manager needs to roll back database
updates and restore database to prior consistent state.
After rollback, transaction reaches the
terminated
state.
Processing of Transactions
According to C. J. Date, an eminent database expert, “The fundamental purpose of
the database system is to carry out
transactions
.” As already mentioned, a database
system is a transaction-processing environment. The database is there to support
processing of transactions.
In the process of supporting transactions, what is the impact of transactions on
the database itself? How do the users consider transactions? What purpose do trans-
actions serve for reading and changing database content? Let us go over a few
important aspects of transactions.
Transaction Structure
Typically, a transaction consists of three major phases:
Input phase
Receive messages and parameters to carry out the
necessary interaction with the database.
Database interaction
Perform database read or write.
Search WWH ::
Custom Search