What does the Write-Ahead Logging (WAL) protocol ensure in terms of database…
2025
What does the Write-Ahead Logging (WAL) protocol ensure in terms of database recovery?
- A.
A transaction's changes are written to the log before the changes are applied to the database.
- B.
The database is always in a consistent state after a system crash.
- C.
Changes are applied to the database and log simultaneously.
- D.
All transaction logs are deleted once the transaction is committed.
Attempted by 4 students.
Show answer & explanation
Correct answer: A
Write-Ahead Logging ensures durability by requiring log records to be written before data modifications are applied. This allows the database to recover consistent states after a crash by replaying transactions from the log.