What is 'Write-Ahead Logging' (WAL)?

What is 'Write-Ahead Logging' (WAL)?

Approach: Explain logging changes before they are applied.

A standard method for ensuring data integrity where changes are first recorded in a persistent log before being applied to the actual database files.

Follow-up: How does WAL help in a power failure?

Key concepts: durability, recovery.