Skip to main content

One post tagged with "data modeling"

View All Tags

Database Schema Design Patterns: Polymorphism, Hierarchies, Audit Logs, Soft Deletes, and SCD

Schema design isn't just about getting data to persist. It's about modeling the shape of your domain — the things that exist, the relationships between them, and the constraints that keep it all consistent. A good schema makes queries fast, business logic obvious, and migrations safe. A bad one makes all three miserable.

These are five patterns that appear in almost every non-trivial system, with notes on when to reach for each one.