I need to create a Multi-tenant schema. I have searched a lot, but I haven't got any concrete solution to create one. Any example would be highly appreciated.

I'm using SQL-SERVER 2008.

I need to use same database for multiple clients, but I need a secure way to implement it. I have the following scenario:

I have 10 tenants, each will be having a separate TenantID. I need to provide custom UI to each user based on the TenantID of the user currently logged in. Forex: Logo, Css files all will be based on the TenantID. Can I achieve it? If yes, how? If no, then what is the alternative?

Please help.

closed as not a real question by JNK Jul 23 '12 at 13:28

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

  • Your question seems overly broad. Also you need to explain exactly what you mean by "I need a secure way to implement it." What specific issues do you need to overcome? – Aaron Bertrand Jul 23 '12 at 12:43
  • I closed this as NARQ since you are basically providing no info and asking for a novella on database design. If you would like to add specific details you need assistance with, and some examples of the kinds of data you will be storing, please edit the question and flag it for moderator attention to be reopened and we can reopen it for you. – JNK Jul 23 '12 at 13:29
  • @JNK I have edited the question and flagged it. Thanks – Raj Wadhwa Jul 24 '12 at 9:40
  • @RajWadhwa Most of the info in your edit is non-database related. Why do you need a single database instead of one per client? What data will be in the db? – JNK Jul 24 '12 at 10:35
  • @JNK That is the requirement of the application. Data like Profile of the employees of different companies, their salary details, their transaction details etc. I just need a way by which I can implement this in database. That is the problem. Thanks – Raj Wadhwa Jul 24 '12 at 11:18

I can suggest Microsoft Dynamics CRM DB model. it has one meta-database ,contains all other db references and which client matches which db. you can find db models on http://www.mibuso.com/downloads.asp?category=crm

Crm creates one db for organization and put the info of the new created db and which clients can use this db/organization into meta-database.

Not the answer you're looking for? Browse other questions tagged or ask your own question.