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?

  1. A.

    A transaction's changes are written to the log before the changes are applied to the database.

  2. B.

    The database is always in a consistent state after a system crash.

  3. C.

    Changes are applied to the database and log simultaneously.

  4. 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.

Explore the full course: Mppsc Assistant Professor