Chapter .10 Transaction Management and Concurrency Control
Transaction Management and Concurrency Control
Why does a multi-user database environment give us a special interest in transaction management
and concurrency control?
Begin by exploring what a transaction is, what its components are, and why it must be managed
carefully even in a single-user database environment. A multi-user database environment makes
transaction management even more critical.
Emphasize the following points:
represents a real-world event
such as the sale of a product.
A transaction must be a
logical unit of work
. That is, no portion of a transaction stands by itself.
For example, the product sale has an effect on inventory and, if it is a credit sale, it has an effect
on customer balances.
A transaction must
take a database from one consistent state to another
. Therefore, all parts of a
transaction must be executed or the transaction must be aborted. (A consistent state of the
database is one in which all data integrity constraints are satisfied.)
All transactions have four properties:
urability. (These four
properties are also known as the
test of transactions.) In addition, multiple transactions must
conform to the property of serializability. Table IM10.1 provides a good summary of transaction
Table IM10.1 Transaction Properties.
: Unless all parts of the executed, the
transaction is aborted
. Indicates the permanence of the
database’s consistent state.
: Once a transaction is committed, it
cannot be rolled back
: Data used by one transaction cannot be
used by another transaction until the first transaction
: The result of the concurrent execution
of transactions is the same as though the transactions
were executed in serial order.