Graph Based Protocol (Tree Locking Protocol) in Database Transactions

Graph Based Protocol (Tree Locking Protocol) in Database Transactions

Graph Based Protocol (Tree Locking Protocol) in Database Transactions

Simplest graph based protocol is Tree Locking Protocol.

  • Tree Locking Protocol

Tree locking protocol is used to employ exclusive lock and when the database is in the form of a tree of data items.  Tree locking protocol is serializable.

Advantages of Tree Locking Protocol
Unlocking of data item is earlier.Shorter waiting time, increase in concurrency.

Disadvantages of Tree Locking Protocol
Transaction may have to unnecessary lock data items to access its child nodes.Huge number of locks and locking overhead.

What is Intension lock?
To indicate along the path from root to the desired node what type of lock it will require from one of the node’s descendants.


Three Types of Intension Locks

  • Intension Shared (IS)
  • Intension Exclusive(IX)
  • Shared Intension Lock (SIX)

Intension Shared (IS) to indicate that a shared lock will requested on some descendent node. Intension Exclusive(IX) to indicate that a exclusive lock will requested on some descendent node. Shared Intension Lock (SIX) to indicate that current node is locked in shared mode, but an exclusive lock will be requested.