March 2022
Intermediate to advanced
682 pages
22h 58m
English
Locking ensures serializability by allowing a transaction to lock a database object to prevent another transaction from accessing or modifying the object. Objects of various sizes, ranging from the entire database down to a single data item, may be locked. The size of the object determines the fineness, or granularity, of the lock. The actual lock might be implemented by inserting a flag in the data item, record, page, or file to indicate that portion of the database is locked, or by keeping a list of locked parts of the database.
Often, there are two categories of locks: shared and exclusive. If a system uses locks, any transaction that needs to access a data item must first lock the item, requesting a shared lock for read-only ...