views:

134

answers:

1

For multitenant databases, to you name tables differently based on:

  • Whether the table will host multiple tenants or just rely on the exist of a tenant column
  • If you support multiple "applications" such as salesforce.com, do you prefix the application name to the table?
  • Do you try to keep the names the same across tables where it may not be necessary in single tenant applications.
+1  A: 

No, we don't change the naming convention. That would be a wild maintenance nightmare, especially if we tied the table or field names to the name of each tenant.

In situations where we have put together "portal" websites, we have relied on a tenants table, and additional foreign key columns to sort out the tenants, unless we're contractually bound to keep the databases separate for each tenant.

In cases where there are separate applications, we use one database per application, and one database containing the common information.

Robert Harvey