Lock-Based Protocol in DBMS
Lock-Based Protocol In this type of protocol, any transaction cannot read or write data until it acquires an appropriate lock on it. There are two types of lock: 1. Shared lock: It is also known as a Read-only lock. In a shared lock, the data item can only read by the transaction. It can be shared between the transactions because when the transaction holds a lock, then it can't update the data on the data item. 2. Exclusive lock: In the exclusive lock, the data item can be both reads as well as written by the transaction. This lock is exclusive, and in this lock, multiple transactions do not modify the same data simultaneously. There are four types of lock protocols available: 1. Simplistic lock protocol It is the simplest way of locking the data while transaction. Simplistic lock-based protocols allow all the transactions to get the lock on the data before insert or delete or update on it. It will unlock the data item after completing the transaction. 2. Pre-claiming Lock Protoc...