none
Multi-Tenancy Model Database Design RRS feed

  • Question

  • I have been reading about the architecture behind the multi-tenancy model and based on the needs of the application I'm writing I'm going with the isolated approach (one database per tenant).  What I am not clear about is how a user belonging to a given tenant is directed to the proper database.  If the login page would have a company ID (or tenant ID), would there have to be a database that keeps user credentials + CompanyID along with the tenant database information (i.e. encrypted connection string)?  The articles I've read deal with the actual tenant database but fail to be clear on this issue.

    Thanks,
    Monday, August 3, 2009 2:37 PM

All replies

  • Hi Danny,

    There are a number of ways that this can be accomplished and it really depends on your applications specific needs.  Your approach of storing the tenant information in an effecient manner would be one way.  Here is a good article that gives details and pluses and minuses of some different approaches to multi-tenancy:

    http://msdn.microsoft.com/en-us/library/aa479069.aspx#docume_topic13

    Another whitepaper you can read is Salesforce.com’s multitenant architecture document. This document is not as technical as the previous one but it outlines some of the business implications of a true multitenant architecture:

    http://wiki.developerforce.com/index.php/Multi_Tenant_Architecture


    Given that you're application is built with .NET, I would highly suggest you take a look at our solution - SaaSGrid: http://apprenda.com/platform/saasgrid-introduction/

    SaaSGrid is a distributed SaaS Application Server that allows companies to build regular single tenant .NET based applications, and deploy them as fully commercialized TRUE multi-tenant SaaS offerings, complete with all of the SaaS specific business systems and tools needed to operate a successful SaaS business. (i.e.: the billing system, provisioning system, subscriber management system, application lifecycle management system, etc.)

    From the data model perspective specifically, this becomes a deploy time decision with SaaSGrid.  You can choose a comingled/single db model, a seperate schema per customer, or isolated db per customer (as you are currently considering), without any additional work on your part.

    If you'd like any additional information or if there is anything else I can help you with, please just let me know.

    - Jesse
    Tuesday, August 4, 2009 4:53 PM
  • Hi

     

    In the multi tenant implementation - Isolated approach model, every tenant will be having a seperate data. The application should maintain a mapping information of each tenantID with the database connection stirng. Once the user launches the application or access the service, from the request the tenant will be identified. Using the tenant information the connection string will be identified in the application mapping information.

    Then establish the connection to the right database.

    Saturday, August 20, 2011 6:54 AM