PC Review


Reply
Thread Tools Rate Thread

Data sotrage design question

 
 
kpg
Guest
Posts: n/a
 
      16th Jun 2010
Hi all,

I have a general design question about a data storing asp.net website I'm
contemplating.

The site will allow users (businesses) to log in and manipulate client
records; add, edit, delete. My design question is this: Should the data
for all the different businesses be in a single database or should I have a
separate sql database for each.

Before applying to much thought to it I assumed the data would be in one
table: clients. Then the thought of different businesses, each unaware of
the other, having their data mingle, as it were, in a single table, for
some reason made me nervous.

So I could add a new client table for each business as they create an
account with me. Of course the end product will have several tables, not
just a client table. This approach also requires that the tables have
unique names, most likely the user's account number with a table suffix.

An alternative is to have a separate database file for each business, then
the table names could all be the same, just the database name is different.
I like this idea because it would allow a copy of the file to be given to
the customer if they ever wanted their data (for use elsewhere).

The problem is I will be hosting this site on some commercial third party
server and I don't know how much freedom will be given to me to create an
unlimited number of databases.

Does anyone know how existing large data based web sites organize the user
data? What there pros and cons.

Thanks,

kpg

 
Reply With Quote
 
 
 
 
Miro
Guest
Posts: n/a
 
      16th Jun 2010
There is a third option you are not considering.

1 database and every table has a column called "COMPANYCODE/ID".

When a user logs in, they log in to their company thus you have a CompanyID.

Every SQL statement you write - make sure you put "where companycode =
companyID"

That might be a solution for you.



"kpg" <ipost@thereforeiam> wrote in message
news:Xns9D99698393CF8ipostthereforeiam@207.46.248.16...
> Hi all,
>
> I have a general design question about a data storing asp.net website I'm
> contemplating.
>
> The site will allow users (businesses) to log in and manipulate client
> records; add, edit, delete. My design question is this: Should the data
> for all the different businesses be in a single database or should I have
> a
> separate sql database for each.
>
> Before applying to much thought to it I assumed the data would be in one
> table: clients. Then the thought of different businesses, each unaware of
> the other, having their data mingle, as it were, in a single table, for
> some reason made me nervous.
>
> So I could add a new client table for each business as they create an
> account with me. Of course the end product will have several tables, not
> just a client table. This approach also requires that the tables have
> unique names, most likely the user's account number with a table suffix.
>
> An alternative is to have a separate database file for each business, then
> the table names could all be the same, just the database name is
> different.
> I like this idea because it would allow a copy of the file to be given to
> the customer if they ever wanted their data (for use elsewhere).
>
> The problem is I will be hosting this site on some commercial third party
> server and I don't know how much freedom will be given to me to create an
> unlimited number of databases.
>
> Does anyone know how existing large data based web sites organize the user
> data? What there pros and cons.
>
> Thanks,
>
> kpg
>

 
Reply With Quote
 
Mr. Arnold
Guest
Posts: n/a
 
      16th Jun 2010
kpg wrote:
> Hi all,
>
> I have a general design question about a data storing asp.net website I'm
> contemplating.
>
> The site will allow users (businesses) to log in and manipulate client
> records; add, edit, delete. My design question is this: Should the data
> for all the different businesses be in a single database or should I have a
> separate sql database for each.


The example I have seen, all client data is kept in one database.
>
> Before applying to much thought to it I assumed the data would be in one
> table: clients. Then the thought of different businesses, each unaware of
> the other, having their data mingle, as it were, in a single table, for
> some reason made me nervous.
>
> So I could add a new client table for each business as they create an
> account with me. Of course the end product will have several tables, not
> just a client table. This approach also requires that the tables have
> unique names, most likely the user's account number with a table suffix.


It's maintenance nightmare. The example I have seen, all data by client
is kept in the same tables.
>
> An alternative is to have a separate database file for each business, then
> the table names could all be the same, just the database name is different.
> I like this idea because it would allow a copy of the file to be given to
> the customer if they ever wanted their data (for use elsewhere).


Yeah OK....
>
> The problem is I will be hosting this site on some commercial third party
> server and I don't know how much freedom will be given to me to create an
> unlimited number of databases.
>
> Does anyone know how existing large data based web sites organize the user
> data? What there pros and cons.


The key to it I think is to design the application so that security and
data access is by client and user within client. The business layer
should be security aware by client and user within client.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Design question: transferring data between business objects and the data layer olduncleamos Microsoft C# .NET 3 31st Oct 2006 12:29 PM
Data Design Question =?Utf-8?B?SmVmZiBCZW5kZXJ0?= Microsoft Access Database Table Design 2 21st Oct 2005 06:50 PM
Data design question Massimo Microsoft Dot NET Framework Forms 2 28th Jun 2005 07:52 PM
Data design question Massimo Microsoft ADO .NET 2 28th Jun 2005 07:52 PM
data design question PF Microsoft Access Database Table Design 1 14th Aug 2004 11:59 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:24 AM.