CS FundamentalsHardProduct-company MCQ pattern
How many of the following statements are correct? 1. Strict 2PL holds all exclusive locks until commit or abort and so avoids cascading rollbacks. 2. Conservative (static) 2PL acquires all locks before the transaction begins and is deadlock-free. 3. Rigorous 2PL releases shared locks early but holds exclusive locks until commit. 4. Every schedule produced by basic 2PL is conflict serializable.
- A. Only one
- B. Only two
- C. Only three
- D. All four
Correct answer: C. Only three
1, 2 and 4 are correct. 3 is wrong: rigorous 2PL holds ALL locks, shared and exclusive, until commit; holding only exclusive locks is strict 2PL.
More DBMS and SQL questions
- Deadlock prevention with timestamps: T1 (timestamp 5) is older than T2 (timestamp 10). T2 holds a lock on X and T1 requests it…
- Immediate-update recovery with a checkpoint. Log (oldest first): <T1 start>, <T1 commit>, <T2 start>, <checkpoint, active = {T2}>, <T3…
- A file of 30,000 records (100 bytes each, unspanned) is sorted on key K and stored in 1,024-byte blocks. A primary (sparse) index on K…
- A B+ tree indexes 1,000,000 keys. Every leaf holds 100 keys and every internal node has 100 children, and all nodes are completely full…
- An ER design has entity sets E1 and E2 joined by a one-to-one relationship R. Both E1 and E2 participate TOTALLY in R, and neither has a…
- Assertion (A): In SQL, WHERE dept = NULL returns no rows even when dept contains NULL values. Reason (R): A comparison with NULL using =…