/    /  DBMS- Validation Based Protocol (2)

Validation Based Protocol

 

Consider the following schedule :

T27T28T29
read(Q)
write(Q)
write(Q)
write(Q)

 

This schedule is ‘view equivalent’ to the serial schedule <T27, T28, T29>, since the one read(Q) instruction reads the initial value of Q in both schedules and T29 performs the final write of Q in both schedules.

 

Hence, this schedule is said to be ‘view serializable’.

 

In the above schedule, Transaction T28 and T29 perform write(Q) operations without having performed a read(Q) operation. Writes of this sort are called ‘blind writes’.

 

The ‘validation protocol’ requires that each transaction Ti executes in two or three different phases in its lifetime, depending on whether it is a read-only or an update transaction.

 

The phases are in the following order :

 

(a) Read Phase: During this phase, the system executes transaction Ti. It reads the values of the various data items and stores them in variables local to Ti.  It performs all write operations on temporary local variables, without updates of the actual database.

 

(b) Validation Phase: The validation test is applied to transaction Ti. This determines whether Ti is allowed to proceed to the write phase without causing a violation of serializability. If a transaction fails the validation test, the system aborts the transaction.

 

(c) Write Phase: If the validation test succeeds for transaction Ti, The temporary local variables that hold the results of any write operations performed by Ti are copied to the database. Read-only transactions omit this phase.

 

To perform the validation test, it is required to know when the various phases of transactions took place.

 

Therefore, associate three different timestamps with each Ti :

(a) Start (Ti): the time when Ti started its execution.

(b) Validation (Ti): the time when Ti finishes its read phase and starts its validations phase.

(c) Finish (Ti): the time when Ti finished its write phase.

 

Reference Link

Validation Based Protocol