Region: A Lesson in Data Integrity
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
The author, a database-minded engineer, argues that data integrity belongs in the database rather than application code, and walks through four ways to enforce a region column on a 24-million-row Postgres table: a domain, an enum, a text column with a check constraint, and a reference table.