Databases use a (or page cache) to keep frequently accessed disk pages in memory.
ACID is not magic. It’s a set of trade-offs.
The slowest layer, where data is ultimately persisted. fundamentals of database engineering by hussein nasser
You cannot fix what you cannot measure. Every database engineer must monitor:
| Engine | Strategy | Best For | Examples | |--------|----------|----------|----------| | | Sequential writes, immutable files | High write throughput | Cassandra, RocksDB, LevelDB | | B-Tree | In-place updates, balanced tree | Fast reads, transactions | PostgreSQL, MySQL (InnoDB), SQLite | Databases use a (or page cache) to keep
Detailed explanations of locking mechanisms (shared vs. exclusive), latches, and optimistic versus pessimistic concurrency control to manage multiple simultaneous users.
Understanding the write path explains durability and performance. The slowest layer, where data is ultimately persisted
If the power goes out, how does the database ensure no data is lost? The answer is the Write-Ahead Log. Nasser explains this concept clearly: the database writes changes to a sequential append-only log before applying them to the actual data pages. This ensures durability and enables crash recovery.