Home All Groups Group Topic Archive Search About

Building a multi-tenancy application

Author
21 Jan 2006 11:24 AM
Gabriël@Home
Hi,

Can anyone point me to a article of product about using an application
hosted on a webserver for multiple customers? So everything is the same
except for the connection string each customer runs with, which gets
loaded upon logon.

My situation is a following:
- 1 set of code which can interact with the database
- 1 SQL Server instance with multiple Databases (1 per customer)
- 1 File Storage Folder with a folder in which a structue for each
client resides

Is this a keepable structure in performance? Are there better "best
practices"?

Any comments will be appericiated!

Greets,
Gab

Author
21 Jan 2006 2:35 PM
Jonathan Broadus
Show quote
On Sat, 21 Jan 2006 12:24:56 +0100, "Gabriël@Home" wrote:

> Hi,
>
> Can anyone point me to a article of product about using an application
> hosted on a webserver for multiple customers? So everything is the same
> except for the connection string each customer runs with, which gets
> loaded upon logon.
>
> My situation is a following:
> - 1 set of code which can interact with the database
> - 1 SQL Server instance with multiple Databases (1 per customer)
> - 1 File Storage Folder with a folder in which a structue for each
> client resides
>
> Is this a keepable structure in performance? Are there better "best
> practices"?
>
> Any comments will be appericiated!
>
> Greets,
> Gab

Gab,

Is there a reason, such as giving customers access to the database, that
you need a separate database instance for each customer?

In an "Application Service Provider" situation, such as what you're
describing, it's typical to have a database table which lists customers,
and use the KeyID from this table on all other tables, to identify the
records that belong to each customer.

When a customer logs in, you store the ID for them, and can then store all
data in a single set of tables, using the CustomerKey as a part of your
where clauses to be sure you only retrieve data for that one customer.

Does this answer what you're looking for?

Jonathan
Author
22 Jan 2006 11:55 AM
Gabriël@Home
Jonathan Broadus wrote:
Show quote
> On Sat, 21 Jan 2006 12:24:56 +0100, "Gabriël@Home" wrote:
>
>
>>Hi,
>>
>>Can anyone point me to a article of product about using an application
>>hosted on a webserver for multiple customers? So everything is the same
>>except for the connection string each customer runs with, which gets
>>loaded upon logon.
>>
>>My situation is a following:
>>- 1 set of code which can interact with the database
>>- 1 SQL Server instance with multiple Databases (1 per customer)
>>- 1 File Storage Folder with a folder in which a structue for each
>>client resides
>>
>>Is this a keepable structure in performance? Are there better "best
>>practices"?
>>
>>Any comments will be appericiated!
>>
>>Greets,
>>Gab
>
>
> Gab,
>
> Is there a reason, such as giving customers access to the database, that
> you need a separate database instance for each customer?
>
> In an "Application Service Provider" situation, such as what you're
> describing, it's typical to have a database table which lists customers,
> and use the KeyID from this table on all other tables, to identify the
> records that belong to each customer.
>
> When a customer logs in, you store the ID for them, and can then store all
> data in a single set of tables, using the CustomerKey as a part of your
> where clauses to be sure you only retrieve data for that one customer.
>
> Does this answer what you're looking for?
>
> Jonathan


Thanks for the answer!

I think it's a bit of an answer I was looking for. But are there reasons
why you should have multiple databases (I can sync there structure
within seconds) on 1 sql server?

Thanks,
Gab

AddThis Social Bookmark Button