DBMS · Question 10 · Medium

Which rule does Write-Ahead Logging (WAL) enforce?

  1. The log record for a change must reach stable storage before the modified data page is written to disk
  2. The modified data page must be written to disk before its log record
  3. Log records are written only after all data pages of the transaction are on disk
  4. Log records are kept only in main memory until the next checkpoint
Answer and explanation

Answer: A. The log record for a change must reach stable storage before the modified data page is written to disk

Explanation: Under WAL, the undo/redo information has to be in the stable log before the corresponding data block is written. That way, recovery after a crash can always undo or redo the change.

Previous: What does the basic Two-Phase Locking (2PL) protocol guarantee? · Next: In a B+ tree index, where are the pointers to actual data records stored?

Practise dbms

Try a fresh set of dbms questions with an explanation after every answer, free and without signing up: DBMS practice. Or sit a full placement mock test.

More dbms questions

More technical & programming practice

SQL · Operating Systems · Computer Networks · Software Engineering · Cloud & DevOps · GenAI Basics · Pseudo-code · C Programming

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge