ohdang888 Posted March 22, 2008 Share Posted March 22, 2008 i have a "add friends" tool i'm building... but i'm confused as to what tables would be more efficient? Table 1 user_1_id -- user_2_id This table would have 1 row for every " friend relationship" Table 2 id (of user) -- friend_1--friend_2-- friend_3-- etc. This table would have 1 row per user, and friends would be added to the row, each under a new column Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted March 22, 2008 Share Posted March 22, 2008 The first table is more efficient. If you did the second one, how would you know how many columns to make? You would have to make hundreds, if not thousands...and there would be tons of empty ones, thats not efficient at all. Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted March 22, 2008 Author Share Posted March 22, 2008 alright thanks! 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.