Introduction To Validation Based Protocol in DBMS
Introduction To Validation Based Protocol in DBMS
works on the validation rules and time-stamps. It is also known as the optimistic
concurrency control technique. The protocol associated with three phases for managing
concurrent transactions such as read phase, validation phase, and write phase. The
transactions, hence there is no checking process happening while the transactions are
executed. This protocol is preferable for short transactions. It uses the local copy of the
data for the rollback mechanism that is used to manage rare conflict scenarios and
The Validation based protocol works based upon the following three phases
Read and Execution Phase: Read phases involve read and execute an operation
for Transaction T1. The values of the multiple data items are being read in this
phase and the protocol writes the data in a temporary variable. The temporary
variable is a local variable that holds the data item instead of writing it to the
database.
protocol. It involves validating the temporary value with the actual values in the
Write Phase: The write phase ensures valid data to be written to the database
that is validated in the validation phase. The protocol performs the rollback
protocol. There are three timestamps that control the serializability of the validation
item being read and executed in the read phase of the validation protocol.
completed the read phase and started with the validation phase.
To manage the concurrency between transactions T1 and T2, the validation test process
for T1 should validate all the T1 operations should follow TS(T1) < TS(T2) where TS is
In this condition, T1 completes all the execution processes before the T2 starts the
operations.
The validation phase of T2 should occur after the finish phase of T1. This scenario
The Transactions are able to access the mutually exclusive database resource at a
The validation based protocol relies on the timestamp to achieve serializability. The
validation phase is the deciding phase for the transaction to be committed or rollback in
the database. It works on the equation TS (T1) =Validation (T1) where TS is the time
2
How does the Validation Protocol Work?
We will discuss an example scenario to demonstrate how the validation protocol works
Transaction T1 Transaction T2
Read(A) Read(A)
Read(B) A=A-40
<Validate> Read(B)
Display(B+A) B=B+80
<Validate>
Write(A)
Write(B)
The transaction table is shown in the example associated with transaction T1 and
The concurrent transaction process starts with T1 with a reading operation as Read
(A) where A is the numeric data element in the database. In the next step, the
transaction T2 also reads the same data variable A after some time. Transaction T2
It is represented as A=A-40 in the transaction table. The next step is a read operation
Read(B). After the read operation completed, the transaction T2 immediately performs
an arithmetic operation on the variable B. It uses the addition operator ‘+’ for adding a
In the next step of the concurrent transaction, T1 reads the variable B with
operation Read (B). Now the validation based protocol comes into the action in the
3
transaction T1 that validates the time stamp of the start phase of T2 lesser than the
finishing phase time stamp of Transaction T1 and that is a lesser timestamp as the
Similarly, in the Transaction T2, the validation based protocol validates the
timestamps. In the example shown in the table indicates both the validation based
It completes the concurrent transaction scenario with validation based protocol in DBMS.
Advantages
Below are mentioned the advantages:
The validation based protocol considers high priority to the greater degree of
This protocol is known for less number of rollback while maintaining the
Disadvantages
Below are mentioned some of the disadvantages:
4
The validation based protocol may arise in the scenario of transaction starvation.
This could be due to the short transaction conflicts associated with this protocol.
The validation based protocol may not suitable for large transactions as it efficient
Conclusion
This protocol is implemented in various enterprise systems such as the banking system,
ticket booking system, traffic lighting management system where a shared datastore is
used for concurrency control. The validation based protocol in DBMS is a mostly used
technique that helps to maintain the data consistency, serializability in the multitasking
https://www.educba.com/validation-based-protocol-in-dbms/