- By it definition,
in an ACR schedule:
- Transactions will
always read (=use) data
written by
committed transactions
|
In other words,
in an ACR schedule:
- Transactions do
not read
dirty data
(written by uncommitted
transactions)
|
- We will prove that:
- Consider an
arbitrary transaction
T2 that
read some
DB element X that has been
written by
another
(arbitrary) transaction
T1:
We will insert locks and commits to make
the schedule into
a strick 2-phased schedule with
regards to these 2 operations....
- The transaction T1
must have an exclusive lock on
DB element X in order to
write X:
- The transaction T1
must have released
the exclusive lock
on X
before transaction T2 could
read lock (= shared lock) the
DB element X:
-
By the strict 2-phased
locking rule,
the transaction T1
must have
committed
before the
unlock (exclusive lock)
operation:
- Therefore:
- Transaction T2 can
only read
DB elements
that have been
written by
committed transactions:
|
By the definition of an
ACR schedule:
- A strict 2-phased schedule is
always
an ACR schedule
|
|