Information Technology Reference
In-Depth Information
We conclude that in both cases, the logical database is restored to the state in which
it was before the transaction started.
We leave as an exercise to figure out what should be done if a system failure
occurs during performing the rollback statement.
t
1.6
ACID Properties of Transactions
The implementor of a database application must take care that each committed
transaction T produced by the application process is logically consistent : when run
alone without outside disturbances or failures on a logically consistent database, T
keeps the database consistent.
Naturally, it has to be possible to program the transactions without taking care
of the physical structure of the database, other concurrent transactions, or system
failures. The function of the database management system is to ensure that both
logical and physical consistencies are preserved when there are multiple logically
consistent transactions running at the same time and system failures can occur.
A rolled back transaction is always trivially logically consistent, regardless of
what it does in its forward-rolling phase and what the integrity constraints of the
database are: in any case, the backward-rolling phase undoes any updates done in
the forward-rolling phase.
A forward-rolling (and thus uncommitted) transaction does not need to be
logically consistent. In some cases it may be difficult or even impossible to retain
a referential integrity constraint in effect between two update actions; in such cases
it is meaningful to require integrity checking to be enforced only at transaction
commit.
In general, transactions are required to satisfy four named properties, called the
ACID properties , of which we have already defined the following three:
1. A tomicity : all the updates performed by a committed transaction appear in the
database, and all the updates performed by an aborted transaction are rolled back.
2. C onsistency : committed transactions retain the consistency of an initially consis-
tent logical database.
3. D urability : all the updates performed by a committed transaction remain perma-
nently in the database.
The fourth ACID property is:
4. I solation : each transaction has—more or less—the impression that it is running
alone, without any other transactions interfering. More specifically, isolation
means restricting how early updates by a transaction become visible to other
transactions and how early values read by a transaction can be overwritten by
other transactions. When transactions are run in full isolation, an update by a
transaction becomes visible to, or a value read by a transaction is overwritten by,
another transaction only when the first transaction has committed; then it seems
Search WWH ::




Custom Search