Kingy Posted September 26, 2008 Share Posted September 26, 2008 On my site I have a user system. Something I want to implement into it is a buddy list. eg: Kingy's friends: bob john blah alice What i'm confusing myself over is getting rid of the many to many relationship the tables may have. Could someone enlighten me on how i would map out the databases properly, how many tables i may need to get rid of unwanted many-to-many relationships Link to comment https://forums.phpfreaks.com/topic/125920-php-buddy-list/ Share on other sites More sharing options...
aniesh82 Posted September 26, 2008 Share Posted September 26, 2008 In my opinion, it only need one table to store this realationship. I assumes that, if A is a Buddy of B then B is a Buddy of A. User Name: User_ID ********************** Kingy 1 bob 2 john 3 blah 4 alice 5 Relationship Table: User_ID_1 User_ID_2 ************************* 1 2 1 3 1 ` 4 1 5 Link to comment https://forums.phpfreaks.com/topic/125920-php-buddy-list/#findComment-651160 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.