Question discussion

In the write-ahead logging (WAL) protocol of a database system, which rule must always be obeyed?

2569Medium DSSSB TGT Computer Science 0 replies 2 views
0

In the write-ahead logging (WAL) protocol of a database system, which rule must always be obeyed?

  • AThe log is never written to disk
  • BThe changed data page must be written to disk before its log record is created
  • CThe log is written only after the transaction has aborted
  • DThe log record describing a change must be written to stable storage before the changed data page is written to disk
Correct answer: D

Explanation

Writing the log first guarantees that after a crash the system can undo uncommitted changes and redo committed ones, which preserves atomicity and durability.

Discussion 0

Nobody has replied yet. Start the discussion!