Multiple Granularity | Database Management System
Multiple GranularityВ | Database Management System
Multiple Granularity : To this point, we have been locking individual data items. It is beneficial to allow locking of various size data items.
>> Define a hierarchy of data granularities, where the small granularities are nested within larger ones.
>> Can be represented graphically as a tree.
When a transaction locks anode in the tree explicitly, it implicitly locks all the node’s descendents in the same mode.
Granularity of locking (level in tree where locking is done):
>> fine granularity (lower in tree): high Concurrency, high locking Overhead (e.g., record locking, attribute locking)
>> Coarse granularity (higher in tree): low locking overhead, low Concurrency (e.g., table locking, database locking)
Example of Granularity Hierarchy
The highest level in the hierarchy is the entire database.
The levels below are relation, tuple and field in that order.