Jump to content

How many Tables?


S Murder

Recommended Posts

I'm making a site and will have a table that will store a user's contact info, display preferences, and more. In normal form they should all be on the same table, but I anticipate that eventually I might have a hundred rows on each profile table. Aside from being less human readable, will it be any slower? Would it be better to use separate tables with foreign keys referencing a main profile table for different categories of information? If there's less rows, won't SQL use less memory when performing table joins?

Link to comment
Share on other sites

I think it partly depends on how you are going to be using the data. Take the contact information for example. If the only time you are going to be using any of that data is when you need to contact that person, and when you use that data you are going to be retrieving every column pertaining to contact information, it would probably be a good idea to separate that table from the main users table.If, on the other hand, every time you pull data from the database for a particular user you are always pulling the same columns, it would probably make sense to put all of those columns in the same table.In either case, it really isn't going to matter much with a few hundred rows. Either way is going to be just as fast.

Link to comment
Share on other sites

I'm making a site and will have a table that will store a user's contact info, display preferences, and more. In normal form they should all be on the same table, but I anticipate that eventually I might have a hundred rows on each profile table. Aside from being less human readable, will it be any slower? Would it be better to use separate tables with foreign keys referencing a main profile table for different categories of information? If there's less rows, won't SQL use less memory when performing table joins?
what JESH says is accpetable.There has to be fine tuning of SQL queries and the joins that will be used in the code level.Check what happens when all the 100 users will try to login at the same time.this may lead to only a performance issue.Always the table normalization is good for every thing.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...