acidglitter Posted August 3, 2008 Share Posted August 3, 2008 on one of my sites i have two members tables. most of the fields in both of them are varchar and int with a couple date fields. the first table is used a lot more frequently than the second table. what would be the easiest on the server and load the fastest? to keep them both separate, or to combine everything into one table? (i think there would be 16 fields total if i put them together) Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 3, 2008 Share Posted August 3, 2008 A table should be defined as a place holder for rows of data that contain data of the same type but of different value (such as user's accounts) If you have different account types you can account for this with a single enum or integer. If those account types require different fields you can account for it by using additional separate tables. 1 table probably work better because then you can index the fields once instead of twice. Quote Link to comment Share on other sites More sharing options...
acidglitter Posted August 3, 2008 Author Share Posted August 3, 2008 thanks for the reply. there's only one type of account so i'll probably just go and put the tables together. and jw about your including a definition, did i describe the table wrong? Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted August 3, 2008 Share Posted August 3, 2008 no what I am saying is what a table in general should be if you have a very clear and evident 2 different user account types then by all means seperate them. But if you can not find a clear reason to put a user in 1 table and not in another than they should be in 1 table. You can always UNION the tables but i see that as sloppy writing. 1 table is always good keep all your foreign keys from 1 source. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.