Difficulty: Easy
Correct Answer: Exclusive lock
Explanation:
Introduction / Context:
To preserve consistency, DBMSs use lock modes to control concurrent access. This question asks for the lock that blocks all other access (reads and writes) while held.
Given Data / Assumptions:
Concept / Approach:
An exclusive (X) lock grants a transaction the sole right to read and modify the item and prevents other transactions from acquiring shared or exclusive locks on the same item until it is released.
Step-by-Step Solution:
Verification / Alternative check:
Lock matrix check: X with S = conflict, X with X = conflict; the item is fully isolated.
Why Other Options Are Wrong:
Common Pitfalls:
Assuming “exclusive” only blocks writers; in standard compatibility models, it blocks both readers and writers.
Final Answer:
Exclusive lock
Discussion & Comments