Data Modeling

0001-01-01

Foreign Key Constraints and What the Planner Knows

A foreign key is not just validation — it is a declaration that tells the query planner something is guaranteed, enabling optimizations it cannot safely make without that guarantee.

0001-01-01

The Three Database Anomalies

Storing the same fact in more than one place is the root cause of three predictable failures. Understanding update, insertion, and deletion anomalies is what makes normalization feel obvious rather than arbitrary.