CS FundamentalsHardIBM · Deloitte pattern
Rigorous two-phase locking (Rigorous 2PL) goes one step further than Strict 2PL. What extra guarantee does it add?
- A. It removes the shrinking phase
- B. It allows deadlock to never occur, unlike Strict 2PL
- C. It only works with a single resource type
- D. It holds BOTH shared (read) and exclusive (write) locks until commit/abort, so transactions appear to execute in their commit order, which is a useful extra property for some replication/recovery schemes
Correct answer: D. It holds BOTH shared (read) and exclusive (write) locks until commit/abort, so transactions appear to execute in their commit order, which is a useful extra property for some replication/recovery schemes
Strict 2PL only holds WRITE locks until commit; Rigorous 2PL holds both read and write locks until commit/abort. This gives the useful property that the order in which transactions commit matches a valid serial order (commit order = serialization order), which simplifies certain recovery and replication protocols.
More DBMS and SQL questions
- Multiple Granularity Locking uses intention locks (IS, IX, SIX) on coarser objects like a table, in addition to ordinary shared/exclusive…
- A foreign key column is declared ON DELETE CASCADE. If the referenced (parent) row is deleted, what happens to the child rows referencing…
- A schema uses salary DECIMAL(8,2) for a salary column. Which value would be REJECTED when inserted?
- A column is declared VARCHAR(10) vs. CHAR(10). For a value like 'cat' (3 characters), which statement is correct about storage and…
- A query planner chooses a full table scan over using an available index on a WHERE column. Which scenario makes this the RIGHT choice, not…
- Which statement about a query execution plan using a hash join versus a nested-loop join is correct?