In database concurrency control, lock granularity refers generally to:

2012

In database concurrency control, lock granularity refers generally to:

Answer: B. The size or scope of the data item to which one lock appliesConcept — Lock granularity is the size or scope of the data unit controlled by a single lock. A lock may cover a database, file, record, page, or smaller…

  1. A.

    The storage capacity of the entire database

  2. B.

    The size or scope of the data item to which one lock applies

  3. C.

    The byte length of one record

  4. D.

    The byte length of one file

Attempted by 51 students.

Show answer & explanation

Correct answer: B

Concept — Lock granularity is the size or scope of the data unit controlled by a single lock.

A lock may cover a database, file, record, page, or smaller item; larger units are coarser and smaller units are finer.

Application — The stem asks for the general locking meaning, so size means the scope of the item controlled by one lock, not a byte count.

The applicable unit is a data item. Depending on the locking scheme, that item may be a database, file, page, record, field, or another unit.

Contrast — The other values describe physical storage measurements rather than the general lock-scope definition:

  • The storage capacity of the entire database is a physical byte-count property, not the general lock-scope definition.

  • The byte length of one record is a physical size property of a particular record.

  • The byte length of one file is a physical size property of a particular file.

Cross-check — Changing from database-level locking to record-level locking changes the amount of data controlled by one lock even if no stored byte count changes.

Result — Therefore, lock granularity denotes the size or scope of the data item treated as one locking unit.

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…