arrow
arrow
arrow
In the context of database transactions, a shared lock allows which of the following operations?
Question



In the context of database transactions, a shared lock allows which of the following operations?

A.

Only read operations by multiple transactions simultaneously

B.

Both read and write operations by multiple transactions simultaneously

C.

Only write operations by a single transaction

D.

Both read and write operations by a single transaction

E.

None of these

Correct option is A

A shared lock is used in database systems to allow multiple transactions to read the same data simultaneously without interference. However, write operations are restricted to maintain consistency and prevent conflicts.
Important Key Points:
1. A shared lock ensures that data can be read by multiple transactions at the same time without allowing any of them to modify it.
2. If one transaction holds a shared lock, other transactions can also acquire shared locks on the same data.
3. To write data, a transaction must acquire an exclusive lock, which prevents others from accessing the data.
4. Shared locks are part of the locking mechanism used in concurrency control to maintain database integrity.
Knowledge Booster:
· Exclusive Lock: Prevents other transactions from both reading and writing to the data. Used when a transaction intends to modify data.
· Deadlock: A situation that can occur in locking mechanisms when two or more transactions wait for each other's locks to release.
· Two-Phase Locking Protocol: A concurrency control method that ensures serializability by acquiring all locks before releasing any.

Free Tests

Free
Must Attempt
Video Solutions

RBI Assistant Pre 2026 Full Mock Test -01

languageIcon English
  • pdpQsnIcon100 Questions
  • pdpsheetsIcon100 Marks
  • timerIcon60 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Asst Prelims 2026 : Reasoning Section Test 01

languageIcon English
  • pdpQsnIcon35 Questions
  • pdpsheetsIcon35 Marks
  • timerIcon20 Mins
languageIcon English
Free
Must Attempt
Video Solutions

RBI Office Attendant 2026 Full Mock Test - 01

languageIcon English
  • pdpQsnIcon120 Questions
  • pdpsheetsIcon120 Marks
  • timerIcon90 Mins
languageIcon English
test-prime-package

Access ‘IBPS SO IT Officer’ Mock Tests with

  • 60000+ Mocks and Previous Year Papers
  • Unlimited Re-Attempts
  • Personalised Report Card
  • 500% Refund on Final Selection
  • Largest Community
students-icon
354k+ students have already unlocked exclusive benefits with Test Prime!
Our Plans
Monthsup-arrow