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!

Database structure efficiency questions

Status
Not open for further replies.

figment88

Technical User
Apr 28, 2006
5
US
I'm setting up a new mySQL backed website. Each user needs a database table with about 12 fields that are the same for each user. Users will vary in the number ofrows from about 20 to 200.

I'm trying to decide if I should create a seperate table for each user with the same 12 fields or just stack the users on top of one another in a large table and add a 13th field for user_ID.

Other than some periodic admin reports to see what's going on with the site, data from one user will not need to be accessed with data from other users which makes me inclined to use seperate tables.

I'm not even really sure what other potential issues might be, so any thoughts appreciated.
 
It depends what additional data is to be stored.
You have the users list, name address etc. and then what else?
Code:
[i]
Users will vary in the number of rows from about 20 to 200.
[/i]
What will the additional rows contain?
If each user has numerous rows of data then I would suggest you have a USERS table and a DATA table linked by a customer_id field.
Make it easy to expand, you may not need to but if you do, it will save a complete re-write.

Keith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top