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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schema per user or userid as part of primary key ?

Status
Not open for further replies.

Karen99

Programmer
Aug 5, 2003
113
ZA
I've got the following scenario:

Have 10 - 30 user specific tables. Can have 5 - 50 users. A user can have up to 1 million records for some tables.

So must I add a user_id to the primary key of the table. That mean that that table can have 50 million record in it.

Or is it better to create a schema for each user. Thus having maybe 30 * 50 tables in the db.

Anybody got a suggestion ?

Thanks
Karen
 
A schema per user would mean changing the schema when a user leaves or is added so go for the user_id in the tables.

======================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top