CS FundamentalsVery hardGATE CS
Which statement about compensation log records (CLRs) in ARIES is correct?
- A. CLRs are undone during a later restart if a crash interrupts recovery
- B. CLRs record only the transaction id, not the page changed
- C. CLRs are redo-only and carry an UndoNextLSN, so a crash during undo never undoes the same update twice
- D. CLRs are written during the redo pass to mark pages already brought up to date
Correct answer: C. CLRs are redo-only and carry an UndoNextLSN, so a crash during undo never undoes the same update twice
Each undo action writes a CLR that is redone but never undone; its UndoNextLSN points to the next record still to undo, so repeated crashes during rollback do bounded work. CLRs are written in the undo pass, not the redo pass.
More DBMS and SQL questions
- Which locking scheme guarantees BOTH freedom from deadlock and schedules without cascading rollback?
- Table T has 7 rows. What does SELECT COUNT() FROM T HAVING COUNT() > 10; return? (Standard SQL; SQLite accepts HAVING without GROUP BY…
- Table U(x INT UNIQUE) is empty. These statements run one at a time: INSERT (1); INSERT (NULL); INSERT (NULL); INSERT (1). How many succeed…
- Table K(amt INT CHECK (amt > 0)) is empty. These run one at a time: INSERT (-5); INSERT (NULL); INSERT (0); INSERT (3). How many rows does…
- P(id PRIMARY KEY) has rows 1, 2. C(id, pid REFERENCES P ON DELETE CASCADE) has (10, 1), (11, 1), (12, 2). G(id, cid REFERENCES C ON DELETE…
- R(A, B, C) is decomposed into R1(A, B) and R2(B, C). Which condition is necessary and sufficient (under FDs only) for the decomposition to…