Information Technology Reference
In-Depth Information
Chapter 5
Transactional Isolation
The latching protocol applied when accessing pages in the physical database
maintains the integrity of the physical database during transaction processing,
so that, for example, a B-tree index structure is kept structurally consistent and
balanced. When the physical database is consistent, the logical database consisting
of the tuples in the data pages is action consistent, meaning that the logical database
is the result of a sequence of completely executed logical database actions.
Action consistency however does not imply the integrity of the logical database.
First, an action-consistent logical database may not be transaction-consistent, that is,
the result of completely executed (i.e., committed or rolled-back) transactions: some
of the data items may be in an uncommitted state. Second, a transaction-consistent
database may still not be consistent if the transactions have not been executed in
sufficient isolation.
From Sect. 1.6 , we recall that isolation , the third ACID property of transactions,
implies that a transaction has the impression that it is running alone although
in reality many transactions are running concurrently. The actions by different
transactions must be executed in such a mutual order that the actions by different
transactions do not interfere with each other, such as an action by a transaction
accessing a data item updated by another active transaction, which may cause
the integrity of the database to be lost. When transactions are run in complete
isolation, the execution is necessarily equivalent to some serial execution order of
the transactions in which only one transaction is active at a time.
In this chapter we study transactional isolation by means of isolation anomalies
that represent situations in which isolation is violated in a transaction history, that
is, in a mutual execution order of the actions of concurrently running transactions.
A transaction may be set to run at a designated isolation level , meaning that some
of the less serious isolation anomalies are allowed for the transaction, but the more
serious ones are disallowed. At the highest isolation level, called serializability ,all
anomalies are disallowed. When we want to be sure that the integrity of the logical
Search WWH ::




Custom Search