Multi tenant architecture

Posts   
 
    
erichar11
User
Posts: 268
Joined: 08-Dec-2003
# Posted on: 02-Sep-2004 17:28:44   

Hi All, in the app I'm working on I have a single web application with with multiple tenents (i.e. multiple companies using the same exact app, just they can't see someone elses data) Was wondering if I should create a field in every table I have called CompanyId and in my bll always require the companyId to be passed in. That way i can always create a filter to filter only data necessary for a specific customer. Is this the best way to handle this or is there a better way?

arschr
User
Posts: 894
Joined: 14-Dec-2003
# Posted on: 02-Sep-2004 17:48:45   

Our software has a similar constraint. I DO add the ClientID to every table. Not because it is needed, relational integrity being what it is. I add it so that we can tell the client that we can look at each piece of data and know it is theirs.

erichar11
User
Posts: 268
Joined: 08-Dec-2003
# Posted on: 02-Sep-2004 20:05:35   

Thanks arschr,

Appreciate your feeback. I think you hit the nail on the coffen, making sure the client data and only the client data is reveiled to the client.