- Induction asumption:
- Every schedule
Sn−1 of the
(read, write, lock and unlock) operations
found in n−1 transactions
T1,
T2, ...
Tn−1
(that obey the
locking semantics !!!) is
conflict-serializable
|
- Let Sn = a
schedule of the
(read, write, lock and unlock) operations
found in n transactions
T1,
T2, ...
Tn
(that obey the
locking semantics !!!)
- We must show that
Sn is
a conflict-serializable schedule
|
- Let ui(•)
be the first unlock operation
found in
schedule Sn:
Claim:
- We can move
all
the operations
ri(•) and wi(•)
by
transaction Ti
forward in
schedule Sn
without passing
any
conflicting operation by
another transaction
|
- Proof of the claim:
- Consider an
aribitrary operation
by transaction Ti: e.g.,
wi(Y)
- Consider
an arbitrary conflicting operation
by some other transaction Tj: e.g.,
wj(Y)
- We will prove that
this ordering of
operations is
not possible:
- In order for this ordering to be
legal
(obey the locking rules),
we must have
the following lock/unlock sequence on
DB element Y:
- Since every transaction is
2PL, the
unlock operations must
follow the
lock operation
ℓi(X):
Theorefore,
in
schedule Sn, the
transcation j will perform
an
unlock operation
before
transcation i:
This is a contradiction of
the fact that
transcation i
performs the
first unlock operation !!
|
So this claim is
true:
- We can move
all
the operations
ri(•) and wi(•)
by
transaction Ti
forward in
schedule Sn
without passing
any
conflicting operation by
another transaction:
|
Therefore, the schedule Sn is
conflict-equivalent to the
following schedule S'n:
Schedule S'n consists of:
- All operations by
transaction Ti
(the first transaction that performs an
unlock operation
- A sub-schedule S''n−1
of
n−1 (2PL) transactions
|
By the Induction asumption:
- Every schedule
Sn−1 of the
(read, write, lock and unlock) operations
found in n−1 transactions
T1,
T2, ...
Tn−1
(that obey the
locking semantics !!!) is
conflict-serializable
- Therefore:
the sub-schedule S''n−1
is
conflict-serializable:
|
Consequently:
- The schedule Sn
is
conflict-serializable:
|
Q.E.D.
|