Question 31
MediumWhich pairs of operations on the same item, by different transactions, conflict?
- A.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
DBMS
Which pairs of operations on the same item, by different transactions, conflict?
Every pair of operations
Read–write, write–read and write–write
Only write–write
Only read–read
Sign up free to see the answer and a step-by-step explanation.
In timestamp ordering, what happens if a transaction tries to read an item already written by a younger transaction?
It waits forever
The younger transaction is aborted
It is rolled back (and restarted with a new timestamp)
It reads the new value
Sign up free to see the answer and a step-by-step explanation.
What is multiversion concurrency control (MVCC)?
Using several kinds of locks
Running several copies of the DBMS
Backing up data in versions
Keeping several versions of data so readers see a snapshot and don't block writers
Sign up free to see the answer and a step-by-step explanation.
What is lock granularity?
The number of locks per user
The size of the data item a lock covers, such as a row, page or table
How long a lock is held
The speed of acquiring a lock
Sign up free to see the answer and a step-by-step explanation.
T1 holds a shared lock on X. T2 requests a shared lock on X. What happens?
T1 is aborted
Deadlock
T2 waits
T2 gets the lock at once
Sign up free to see the answer and a step-by-step explanation.
T1 holds a shared lock on X. T2 requests an exclusive lock on X. What happens?
T1 is upgraded
X is deleted
T2 gets the lock at once
T2 waits until T1 releases its lock
Sign up free to see the answer and a step-by-step explanation.
In two-phase locking, a transaction has released one lock. What can it no longer do?
Read data it has already locked
Acquire any new lock
Release other locks
Commit
Sign up free to see the answer and a step-by-step explanation.
What is the lock point of a transaction under 2PL?
The moment it acquires its last lock
The moment it reads its first item
The moment it commits
The moment it starts
Sign up free to see the answer and a step-by-step explanation.
Which variant of 2PL holds all exclusive locks until commit, avoiding cascading rollbacks?
Strict 2PL
Basic 2PL
Timestamp ordering
Conservative 2PL
Sign up free to see the answer and a step-by-step explanation.
Which variant of 2PL acquires all locks before starting and so cannot deadlock?
Rigorous 2PL
Basic 2PL
Conservative (static) 2PL
Strict 2PL
Sign up free to see the answer and a step-by-step explanation.