MIT OpenCourseWare, 6.830 Database Systems, Fall 2010, Prof. Carlo Curino and Prof. Michael Stonebraker. Licensed CC BY-NC-SA 4.0. Reorganized into modules by Sequence 106. No lecture videos were published for this course; each session is notes plus readings. Source · CC BY-NC-SA 4.0
Module 5 · Recovery and consistency · Activity 19 of 32
Lecture 14: Degrees of consistency
Lecture notes · Michael Stonebraker
Readings and discussion questions
Read:
Gray, Jim, et al. “Granularity of Locking and Degrees of Consistency in a Shared Data Base.” From Modeling in Data Base Management Systems. Edited by G. M. Nijssen. 1976. In the Red Book.
This paper presents two distinct ideas: first, the notion that there is a “hierarchy of locking” — e.g., that databases can lock pages, tables, tuples, or fields, and that there is a tradeoff between these various degrees of locking. Second, the paper presents that idea that there are different degrees of consistency which transactions can require, and those different degrees imply different locking disciplines with different performance characteristics.
As you read the paper, consider the following questions:
- What is the tradeoff between coarse granularity (e.g., table-level) and fine granularity (e.g., tuple-level) locks in a database system?
- How does hierarchical locking help address the phantom problem (hint: see page 374 and the discussion of index-interval locks.)
- What are the performance tradeoffs between the different degrees of locking?
- How does degree-0 locking ensure compatibility with all other locking modes?
Assigned by MIT for this session; links go to the papers where MIT linked them. Books: Readings in Database Systems (the Red Book, 4th ed.) and Ramakrishnan & Gehrke.