In SaaS multi-tenant database design, do you think it is sufficient to include the tenant id only in top-level resources, knowing that child resources will always be parent-scoped, or should every table include tenant_id
as a foreign key?
For example, if Tenants
have Projects
that have Tasks
, is it enough to specify Projects.tenant_id
and only Tasks.project_id
, because Tasks will "always" be fetched via their corresponding Project?
Or should Tasks (and every other table) include tenant_id
without exception?
Thx!