Transactions & ACID · SQL SQL
What is the primary purpose of the Write-Ahead Logging (WAL) protocol in database transaction management?
Practice question from Transactions & ACID (SQL SQL), with the correct answer and a step-by-step solution.
medium · MCQ · Q-D0092A
What is the primary purpose of the Write-Ahead Logging (WAL) protocol in database transaction management?
- A.To index table columns automatically before a write operation occurs.
- B.To guarantee Atomicity and Durability by ensuring changes are logged to persistent storage before data pages are written.Correct answer
- C.To prevent deadlocks by serializing all incoming transactions.
- D.To compress historical table rows for archiving purposes.
Solution
Write-Ahead Logging ensures that modification logs are flushed to disk before the actual database pages are updated, allowing the database to recover uncommitted or committed changes during crash recovery.
More from Transactions & ACID
- Which property of ACID ensures that once a transaction has been committed, its effects are permanently recorded in the database, even in th…
- In PostgreSQL and MySQL, what is the default transaction isolation level?
- Which of the following phenomena can still occur under the 'Repeatable Read' isolation level in standard ANSI SQL, but is prevented in Post…
- Explain the difference between a 'Dirty Read' and a 'Non-Repeatable Read' anomaly.
Practise more SQL
Sign up free for adaptive practice on this chapter, with instant feedback and hints on every question.
Start practising freeFree to start · No credit card needed