About Database Constraints
Most data problems don’t come from bad SQL — they come from bad assumptions. And the worst one is believing that constraints can be “handled in the application.” They can’t. They never could. The moment data is touched by an ETL job, a script, an integration, a migration, or a future rewrite, every application‑level rule evaporates. The database is the only place where integrity actually persists. Datatypes, keys, foreign keys, checks, and assertions aren’t optional features — they’re the backbone of reliable systems. If the data matters, the constraints belong in the database. Full stop.



