Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DB design / designation...

Status
Not open for further replies.

MarkatTekTips2004

Programmer
Jan 12, 2005
15
0
0
US
I'm setting up an ASP.NET application using SQL Server 2000 which will be used by hundreds of clients. Among the tables in the database, each client should only have access to his own records.

Here's where I'm stuck...

Should I

1. Create a separate database for each client and duplicate the table set. In this case, the connection string would be slightly different based on the client logging in (i.e. the DB name will change, but that should be it). While all tables would contain a fairly small amount of records (e.g. 15,000 - 250,000), this would require several hundred databases, one for each client, on the server. Note, as clients come and go, DBs would have to be deleted / created on the fly programmatically.

or...

2. Create a single database and in each table have a field which uniquely identifies the client (e.g. clientId)? This would require that all queries include a "clientId" specification so as to retrieve/update/delete the proper rows.

I know that some tables will contain several million records in total across the hundreds of client. Others will contain perhaps only 100,000 in total.

I am unaware of the performance issues in SQL Server 2000 and wanted to get advice on this issue.

I do figure SQL Server 2000 will tackle large datasets, but is it better to keep all data within a single database with large numbers of records, or separate them as indicated above?

Thanks for any advice.

Mark
 
personally i would create one db and have a unique clientid...the client could then access the system with a clientRef and password...clientref would need to be unique as well...
 
thanks for your quick reply.

you believe a single db would be the best approach. I know this would certainly simplify things from a maintenance perspective.

My only real concern was the number of records climbing to several million in any given table this way, vs. using separate DBs would keep any given table's rows to a minimum.

This a concern for SQL Server 2000?
 
I'm not positive on that...but i think it should handle it...you should get some approximate figures and ask this question in the SQL Server Forum...there's a lot of people there who know the implications of amounts of data...
 
again, thank you for your input. I have posted in the SQL Server forum (didn't know it existed here) and will see what they say.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top