Database
Design & Architecture
Structured reference material for practitioners working with relational systems, schema design, and query optimization. Each guide focuses on one concrete problem with working examples.
All guides
Ordered by foundational importance — start from the top if you are new to relational modeling.
Normalization from First to Third Normal Form
Most schema problems trace back to skipped normalization steps. This guide walks through 1NF, 2NF, and 3NF using a single realistic order-management table that gets restructured at each stage. You see exactly which anomalies each step removes.
Indexing Strategies for Query Performance
An index on the wrong column can slow writes without helping reads. This guide covers B-tree, hash, and composite indexes with EXPLAIN output examples from PostgreSQL showing where each type applies and where it does not.
Entity-Relationship Modeling in Practice
Translating a set of business requirements into a working schema is harder than it looks. This guide takes a real scenario — a multi-tenant booking system — and builds the ER diagram step by step before converting it to DDL.
Transaction Isolation Levels Explained
Isolation levels are often set once and forgotten. This guide reproduces dirty reads, phantom reads, and non-repeatable reads in actual SQL sessions, then shows which isolation level prevents each — and what the tradeoff in locking overhead is.
How these guides are structured
Each guide starts from a broken or naive implementation — a denormalized table, a missing index, an ambiguous ER diagram. The problem is real enough that you can recognize it from your own work.
From there the guide moves through diagnosis, then a corrected design, then the tradeoffs of that correction. Nothing is presented as the only right answer.
Knowing why a decision was made matters more than memorizing the decision itself.Working SQL included
Every example includes copy-paste SQL you can run against a local database to verify the behavior yourself.
No assumed prerequisites
Each guide defines its terms on first use. You do not need to read them in order, though the sequence helps.
Decision-oriented
Guides end with a short summary of when to apply the technique and when a different approach would serve better.
A suggested reading path
If you are building knowledge from scratch, this order reduces the number of concepts you need to hold in mind at once.
ER Modeling
Understand the domain before touching a schema. Map entities and relationships first.
Normalization
Apply 1NF through 3NF to the schema you modeled. Identify what each step actually fixes.
Indexing
Once the schema is stable, look at query patterns and decide where indexes help versus hurt.
Transactions
With a working schema and indexes in place, address concurrency and isolation for multi-user scenarios.
Working through these guides with a mentor shortens the time between reading and applying.