darian.lagman
Note · 2026-04-30T00:00:00.000Z

Database Project

A compact database-systems project covering query planning, B-tree indexing, and a transactional buffer-pool mental model.


What the project covered

The database project was a useful way to connect data structures to latency. A query plan is not an abstract tree once it is touching disk pages, cache policy, indexes, and transaction boundaries.

Components

Query planning

Convert relational operations into a plan that can estimate cost before touching the full dataset.

B-tree index

Keep ordered keys searchable while preserving locality for range scans.

Buffer pool

Treat memory as a managed cache over pages, not a bag of objects.

Transaction model

Track when reads and writes are visible, and where rollback needs enough history to be safe.

It made the tradeoffs in production databases feel less magical. When Stockman has a slow inventory query, I know to look at cardinality, indexes, page locality, and access patterns before touching the UI.