Im building a SaaS app and working on the database schema right now. The app needs to support multiple tenants, and I plan to use PostgreSQL with RLS for data isolation. I have one main table called "group". This table contains the base configuration and information for each tenant. Every other table in the app will relate back to it for ownership. My question is: Should I use the group_id directly as the tenant_id column in all the other tables? Or is it better to create a separate "tenants" table that generates its own tenant_id, and then have the group table reference that tenant_id as a foreign key? submitted by /u/DCornOnline [link] [comments]