Every Row Belongs to Somebody. Most Tables Don't Say Who.
RedHub AI Editorialupdated November 5, 20267 min read

Jump to a section7
A table that stores people's records needs a column that names who each row belongs to — not a guess, a piece of data the database can check. Without one, there's nothing for a permission rule to compare a row against, which means questions like "is this unique" or "is this the right data type" don't matter yet: the table has already failed the one check everything else depends on.
TL;DR: Ownership isn't one rule among several — it's the prerequisite the other rules need in order to mean anything. A table can have flawless data types and zero duplicates and still fail this test, because none of that answers who a row belongs to. The fix is a column, and it goes on before anything else on that table gets touched.
What "owner" means
An owner column is a piece of data on a row that names the specific account it belongs to — usually something like a user id, sitting alongside the row's other columns, pointing at a real row in your accounts table. It sounds obvious once it's said out loud. It's also an easy piece for a generated schema to leave out, because "store the uploaded file" is a complete instruction without it, and "store the uploaded file, and remember whose it is, in a way the database can verify" is a different instruction that nobody typed.
There's a second, sharper distinction worth making here: an owner column can exist and still fall short. A column can hold a user's email address, copied in at the time the row was created, and that's technically "an owner" in the sense that a human reading the table can figure out whose row it is. But the database can't verify that email still belongs to anyone, can't catch it if the email changes elsewhere and this copy goes stale, and can't be the thing a permission rule leans on with any confidence. It's still better than no column at all: a rule can be written against it, and your code is what keeps it true. That's a different, deeper topic on its own — see Foreign Keys, for People Who Didn't Plan to Learn Them for what turns a copied value into something the database stands behind.
Why this outranks everything else on the table
This is the idea that surprises people the first time they sit with it: ownership isn't graded alongside uniqueness and data types as one more thing to get right. It's graded before them, because both of those other questions are asking "given that this row belongs to somebody, is it being handled correctly?" — and if nothing says who it belongs to, that clause never gets satisfied. The question isn't lower priority. It's a different kind of question, and it comes first.
Picture a table that stores uploaded documents. Every column that isn't the owner is exactly right: a genuine unique constraint stops the same file from being registered twice, every date and file-size field is the correct type, nothing about the table's structure is sloppy. And it still comes back with nothing to enforce against — because there's no column naming who uploaded each file. (This is the table the Data Model Sanity Bench ships in its worked example as T-03, and it reads NOTHING TO ENFORCE AGAINST.) Making every remaining column on that table better, sharper, more precisely typed, changes nothing about that answer. The missing piece isn't a weak rule sitting next to strong ones. It's the thing every other rule on a records table is implicitly standing on.
That's what makes this gate different from a normal checklist item. A checklist item you can improve incrementally — a slightly-off data type is better than a completely wrong one. This one doesn't have a middle. Either some column names who a row belongs to, or every downstream question about that row is moot until one does.
What needs this, and what doesn't
Not every table is a records table, and it's just as easy to over-apply this rule as it is to miss it. A list of plan tiers, a table of country codes, a set of status labels you defined yourself — none of these are records about a person, and none of them need an owner column. Asking "who owns this row" about a table of currency codes isn't rigor, it's confusion about what the table is for. Reference lists need no rules here.
The test that separates the two is simple to ask, harder to remember to ask: for this table, is a row something that happened to a specific person or account, or is it something you decided ahead of time and the same for everyone? Orders, comments, uploaded files, activity logs — things that happened to someone. Plan names, status options, country codes — things you decided. The first kind needs an owner. The second kind doesn't, and adding one would just be noise.
How this connects to the rules you write later
If you're planning to write row-level access rules — "only the owner can read their own row," the kind of policy tools like Supabase let you turn on — this gap is the wall you'll hit first, not last. A permission rule has to compare a row against somebody to decide whether to allow it. If the row has no owner column, there's no comparison to run, so the policy can't be written in any form that does what you want. You cannot secure what you did not model. This is exactly why it's worth checking table shape before you spend an afternoon writing access rules against tables that can't hold them — the Supabase RLS Read-Off is the next step once your tables can answer "whose row is this."
Finding the gaps in your own tables
- List every records table. Skip plan tiers and country codes for now — those aren't in scope. Test: for each table, ask whether a row is something that happened to a specific account, or something you decided.
- Look for a column naming the owner. Not the row's own id — a separate column pointing at whose it is. Test: open one row and ask "which account does this belong to," and check whether any column answers that.
- Add what's missing before anything else on that table. Uniqueness, types, everything else waits. Test: if a records table has no owner column, that's the next thing you build on it, full stop.
A literal sentence to hand your AI builder once you've found a gap: "Add a column to this table that names which user account each row belongs to, and make it a real reference to the accounts table, not a plain value."
The Data Model Sanity Bench ($69) asks this question, along with three others, for every table you list. Its owner question has four answers: a real reference, a plain copied value, none, or "can't find." A records table with none reads NOTHING TO ENFORCE AGAINST whatever its other answers say. A copied value reads YOU ENFORCE IT, which ranks behind a missing owner. You list the tables yourself, in sixty rows on the Bench tab, ten of which ship filled in as a worked example you clear and replace. It never connects to your database.
One more thing worth knowing before you start, because it decides more rows than you’d expect. When you go looking for a table’s owner column and cannot tell — the answer isn’t there, or you can’t follow it — the bench scores that as no owner, the worst thing the blank could be hiding. It reads harshly the first time, and it's the honest way to do it: a gap you have written down gets checked, and a blank you waved past does not. Among tables with no owner, the bench puts the ones scored that way because you couldn't find the answer first in line, since a look may show they're better than scored. In the worked example, the file-upload table whose owner answer couldn’t be found (T-08) is the one the dashboard names to fix first. The bench names a table to fix first only when at least one table reads NOTHING TO ENFORCE AGAINST or YOU ENFORCE IT. When every table holds, it names none.
More in this guide
Frequently asked questions
What counts as an owner column?
A column on a table that names the specific account a row belongs to — typically a user id — ideally stored as a real reference to your accounts table, not just a value that happens to be correct today.
Does every table need an owner column?
No. Only tables that hold records about specific people or accounts — orders, comments, uploads, activity. A reference list you defined yourself, like plan tiers or country codes, isn't a record about anyone and doesn't need one.
What if a table has an owner column, but it's just a copied email or name?
That's a real gap, just a different one — the column exists but the database can't verify it, which means it can drift out of date and can't be trusted the way a genuine reference can. See the foreign keys guide for what turns a copied value into a checked one.
Why does this matter more than whether the table has correct data types?
Because data types and uniqueness are both questions about how a table treats a row it already knows belongs to somebody. If nothing names the owner, those questions don't have anything to attach to yet — fixing them doesn't answer the thing you needed answered.
Is this a security audit of my database?
No. It's a read of table shape — whether a permission rule would have anything to compare a row against. It doesn't inspect your code, your live data, or your access policies, and it isn't a certification of anything.


The gate this post refers to, drawn from the tool’s own logic. See the tool.