/    /  DBMS- Validation Test

Validation Test

 

This test for transaction Ti requires that for all transactions Tk with TS(Tk) < TS(Ti), one of the following two conditions must hold.

(a) Finish(Tk) < Start(Ti).  Since Tk completes its execution before Ti started, the serializability order is indeed maintained.

 

(b) The set of data items written by Tk does not intersect with the set of data items ready by Ti and Tk completes its write phase before Ti starts its validation phase

   ( Start(Ti) < Finish(Tk) < Validation (Ti) ).

 

This condition ensures that the writes of Tk and Tj do not overlap. Since the writes of Tk do not affect the read of Ti and since Ti cannot affect the read of Tk, the serializability order is indeed maintained.

 

Example-1 :

Consider the transactions T25 and T26.

 

T25T26
read(B)
read(B)

B=B-50

read(A)

A=A+50

read(A)

<validate>

display(A+B)

<validate>

write(B)

write(A)

 

Suppose that TS(T25) < TS(T26).

 

Then, the validation phase succeeds in the above schedule.

 

Note that the writes to the actual variables are performed only after the validation phase of T26.

 

Thus, T25 reads the old values of B and A, and this schedule is serializable.

 

Reference Link

Validation Test