What are the locking techniques for concurrency control?
Lock-based Protocols
- Simplistic Lock Protocol. Simplistic lock-based protocols allow transactions to obtain a lock on every object before a ‘write’ operation is performed.
- Pre-claiming Lock Protocol.
- Two-Phase Locking 2PL.
- Strict Two-Phase Locking.
- Thomas’ Write Rule.
What is the importance of Thomas rule?
Thomas Write Rule provides the guarantee of serializability order for the protocol. It improves the Basic Timestamp Ordering Algorithm. The basic Thomas write rules are as follows: If TS(T) < R_TS(X) then transaction T is aborted and rolled back, and operation is rejected.
How does the Thomas write rule improve concurrency?
In Thomas Write Rule users ignore outdated writes. Moreover, of all the Concurrency Protocols that have been discussed, Concurrency is imposed on Schedules that are Conflict Serializable, in Thomas Write Rule, the most important improvement is a user can achieve Concurrency with View Serializable schedules.
How does Thomas Write Rule modify the timestamp ordering protocol?
How is Thomas write rule different from timestamp ordering protocol?
The only difference between both of these lie between in the second rule that in timestamp ordering protocol, if Ti issues write (Q) and TS[Ti] < W-ts(Q), ti is rolled back. However, in Thomas writes rule if TS(Ti) =R timestamp(Q), the write operation can be ignored.
What is blind write in DBMS?
blind write is simply when a transaction writes without reading. i.e a transaction have WRITE(Q), but no READ(Q) before it. So, the transaction is writing to the database “blindly” without reading previous value.
What are the different concurrency protocols used in a distributed database transaction?
Locking-based concurrency control systems can use either one-phase or two-phase locking protocols.
- One-phase Locking Protocol.
- Two-phase Locking Protocol.
- Distributed Two-phase Locking Algorithm.
- Distributed Timestamp Concurrency Control.
- Conflict Graphs.
- Distributed Optimistic Concurrency Control Algorithm.
What is meant by the concurrent execution of database transactions in a multiuser system discuss why concurrency control is needed and give informal examples?
Concurrent execution of database transactions in a multi-user system means that any number of users can use the same database at the same time. Concurrency control is needed in order to avoid inconsistencies in the database.