ITPEC FE Morning October 2019 Question 31

Source exam: ITPEC FE Morning October 2019Topic: Databases

ITPEC FE Morning October 2019 — Question 31 of 80

Database Lock Compatibility — shared locks allow concurrent reads; exclusive locks block everything.

Lock compatibility matrix for concurrency control:

  • Shared + Sharedpermitted (multiple readers OK)
  • Shared + Exclusivedenied
  • Exclusive + Shareddenied
  • Exclusive + Exclusivedenied

Why (a) is correct:
- A shared lock (S-lock) is for reading — multiple transactions can hold shared locks on the same resource simultaneously

Why not others:
- (b) Shared + Exclusive is denied — a writer would conflict with existing readers

- (c) Exclusive + Shared is denied — a reader would see uncommitted (dirty) data

- (d) Exclusive + Exclusive is denied — two concurrent writes cause data corruption

Key rule: Only shared locks are compatible with each other. Any involvement of an exclusive lock blocks all other lock requests.

AI-generated — may contain errors

The original exam layout is preserved in the image so diagrams, formulas, tables, and code remain accurate.

This question comes from an official ITPEC past paper. ITPEC Practice is an independent study tool and is not affiliated with ITPEC. See the official FE past-paper collection or Report an issue.