Multiple choice database

Which of the following correctly describe the locking mechanism in a RDBMS?

  1. A read lock prevents other transactions from reading the locked data

  2. A write lock prevents other transactions from reading or writing to the locked data

  3. Multiple transactions can have write locks on the same data item.

  4. Multiple transactions can have read locks on the same data item.

  5. Either B&D

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

In RDBMS locking, write locks (exclusive locks) prevent other transactions from both reading and writing the same data, ensuring data integrity during modifications. Read locks (shared locks) allow multiple transactions to concurrently read the same data since reading doesn't change it. Option A is wrong because read locks are shared. Option C is wrong because write locks are exclusive - only one transaction can hold a write lock.