The Notions of Consistency and Predicate Locks in a Database System

The Notions of Consistency and Predicate Locks in a Database System

November 1976 | K.P. Eswaran, J.N. Gray, R.A. Lorie, and I.L. Traiger
This paper discusses the concepts of consistency and predicate locks in database systems. It defines transactions, consistency, and schedules, and argues that consistency requires that a transaction cannot request new locks after releasing a lock. It also argues that a transaction needs to lock a logical rather than a physical subset of the database, which may be specified by predicates. An implementation of predicate locks that satisfies the consistency condition is suggested. The paper explores the problems of locking and consistency in more detail. It discusses the concept of phantoms, which implies that one must lock logical subsets of the database rather than individual records. It then proposes an implementation of logical locks that satisfies the requirements of consistency. The discussion is applicable to database systems and more conventional environments such as operating systems. The principal result is that consistency requires that a transaction must be constructed to have a growing and a shrinking phase. During the growing phase, it can request new locks, but once a lock has been released, the transaction cannot request a new one. The paper also discusses the general properties of locking, including the concept of two-phase locking, which ensures that transactions are well-formed and that each transaction sees a consistent state. It explains how predicate locks can be used to solve the problem of phantom records and how they can be used to construct consistent legal schedules. The paper concludes that if only simple predicates are allowed in accesses and predicate locks, then predicate locks can be scheduled in the same way as ordinary locks.This paper discusses the concepts of consistency and predicate locks in database systems. It defines transactions, consistency, and schedules, and argues that consistency requires that a transaction cannot request new locks after releasing a lock. It also argues that a transaction needs to lock a logical rather than a physical subset of the database, which may be specified by predicates. An implementation of predicate locks that satisfies the consistency condition is suggested. The paper explores the problems of locking and consistency in more detail. It discusses the concept of phantoms, which implies that one must lock logical subsets of the database rather than individual records. It then proposes an implementation of logical locks that satisfies the requirements of consistency. The discussion is applicable to database systems and more conventional environments such as operating systems. The principal result is that consistency requires that a transaction must be constructed to have a growing and a shrinking phase. During the growing phase, it can request new locks, but once a lock has been released, the transaction cannot request a new one. The paper also discusses the general properties of locking, including the concept of two-phase locking, which ensures that transactions are well-formed and that each transaction sees a consistent state. It explains how predicate locks can be used to solve the problem of phantom records and how they can be used to construct consistent legal schedules. The paper concludes that if only simple predicates are allowed in accesses and predicate locks, then predicate locks can be scheduled in the same way as ordinary locks.
Reach us at info@study.space