How Databases Store Data: Pages, Heap Files and Row vs Column Storage
Every query you write becomes disk I/O. Understanding how databases store data — pages, heap files, row vs column layout — explains why some queries are fast and others are not.
Guides on SQL, NoSQL, database optimization, migrations, and indexing for developers.
Every query you write becomes disk I/O. Understanding how databases store data — pages, heap files, row vs column layout — explains why some queries are fast and others are not.
Normalization keeps data consistent. Denormalization makes reads fast. Every real schema is a trade-off between them — this post teaches you how to make that call deliberately.
A slow query in production is a fire. EXPLAIN plans show exactly where the database wastes time — if you know how to read them. This post teaches you how, with real examples.
Window functions and CTEs turn 20-line subquery nightmares into clean SQL. Master ROW_NUMBER, RANK, LAG/LEAD, recursive CTEs, and the patterns that appear in real codebases.
Race conditions in databases are silent and devastating. This post explains ACID, all four isolation levels, and the concurrency bugs each level prevents — with examples.
Indexes are the biggest lever for database performance — and the most misused. Learn how B-Tree and Hash indexes work, when to add them, and when they hurt more than help.
SQL is easy to start and hard to master. This post covers every JOIN type, GROUP BY traps, subqueries, and the mental model that makes complex queries feel obvious.
Bad schema design creates bugs invisible until production. Learn the relational model from first principles, then normalize to 3NF/BCNF with real examples and trade-offs.
Most developers use databases without knowing why they exist. Learn what a DBMS really does, why flat files fail at scale, and the trade-offs that make databases essential.
Reliable backend tests require strict database isolation and disciplined CI workflows. This post shows how to reset PostgreSQL safely, use transactions, and run tests confidently in automation.
A productive backend engineer knows how to manage migrations, environments, Dockerized databases, and workflow scripts. This post makes those skills second nature.
Learn how databases evolve with schema changes. Understand migrations, versioning, and best practices for adapting databases over time.
Results