CS FundamentalsVery hardGATE CS (PYQ pattern)
Which of the following statements about two-phase locking variants are correct? I. Basic 2PL guarantees conflict-serializable schedules but not freedom from deadlock. II. Strict 2PL (exclusive locks held until commit) guarantees cascadeless schedules. III. Conservative 2PL (all locks acquired before the transaction starts) is deadlock-free. IV. Basic 2PL guarantees recoverable schedules.
- A. I, II and III only
- B. I and II only
- C. II, III and IV only
- D. I, III and IV only
Correct answer: A. I, II and III only
IV is false: basic 2PL may release locks before commit, so a transaction can read another's uncommitted write and commit first, giving a non-recoverable schedule.
More DBMS and SQL questions
- R has 100 pages and S has 50 pages. Block nested-loop join uses 12 buffer pages: 10 for a block of the outer relation, 1 for the inner and…
- R(A, B, C, D, E, F) has the functional dependencies D → E, AD → B, D → E, DA → F, EC → D, ED → C. How many of the listed FDs violate BCNF…
- R(A, B, C, D, E) has the functional dependencies D → A, EA → C, D → C, D → E, BC → A. How many attributes appear in the left sides of a…
- R(A, B, C, D, E, F) has the functional dependencies F → B, C → A, BD → C, B → E, C → A, BC → A. How many superkeys does R have?
- R(A, B, C, D, E, F) has the functional dependencies DB → C, F → A, AD → C, F → B, CA → D, C → F. 3NF synthesis (canonical cover, one…
- Table AA(x, y): (1,1), (1,2), (2,2), (2,NULL), (3,NULL), (NULL,3). How many groups does SELECT x FROM AA GROUP BY x HAVING COUNT(y) <…