How the roll-up gate works
How the Data-Model Sanity Bench gate works
This tool grades each table on whether the database enforces its rules or you are quietly enforcing them by hand. It reads 10 tables and rolls them into one verdict — the worst, never the average — then a gate that can only make it worse.
The 10 tables
01T-01 · User profilesreal reference · unique enforced · proper typesDATABASE ENFORCES IT
02T-02 · Orders and their totalsmoney stored as text or numberYOU ENFORCE IT
03T-03 · Uploaded documentsholds records with no owner at allNOTHING TO ENFORCE AGAINST
04T-04 · Comments on documentsowner is a plain value, not a referenceYOU ENFORCE IT
05T-05 · The plan tiers you offera reference list, not recordsNO RULES NEEDED
06T-06 · Subscriptionsuniqueness assumed, never enforcedYOU ENFORCE IT
07T-07 · Country and currency codesa reference list, not recordsNO RULES NEEDED
08T-08 · File upload recordsfix firstowner not foundNOTHING TO ENFORCE AGAINST
09T-09 · Team invitesuniqueness answer could not be foundYOU ENFORCE IT
10T-10 · Activity logreal reference · not assumed · proper typesDATABASE ENFORCES IT
MODEL HOLDS
the database enforces every rule that matters
YOU ARE THE CONSTRAINT
a rule holds only because your code remembers to apply it
NOTHING TO BUILD ON
a table holds records with no owner to enforce against
Prerequisite · worsen-only
A table that holds records with no owner drops straight to NOTHING TO ENFORCE AGAINST, before uniqueness or types are even read. There is no point grading the rules on a table that has nothing to attach a rule to — the ownership question is the prerequisite, and everything downstream is moot until it is answered.
NOTHING TO BUILD ONWhy: Two of ten tables hold records with nothing to enforce against, so the model has no floor. Four more work only because your code remembers to: money kept as a loose number, an owner stored as a plain value, uniqueness assumed rather than enforced. Two reference lists genuinely need no rules and never count against you. 2 of 10 with no owner · 4 you enforce by hand · worst-not-average.
Fix firstT-08, file upload records — the owner answer could not be found, so it resolves to none and the prerequisite gate fires
No single table is the crisis — the clustering is. The roll-up takes the worst, the gate escalates when trouble compounds, and it names the one thing to fix first. Grades how a schema is shaped, never a person. It connects to no database — it reads back what you tell it, using rules you can see.