database design - MySQL: Adding connections between people -
i have table "people" (id, name)
1, george 2, nick 3, john 4, paul each customer can connected customer (just reference) example george connected paul
so create new table peopleconnections (peopleconnectid, peopleid, connectedid)
and add relations between people
1, 1, 4 (george paul) 1, 2, 3 (nick john) 1, 2, 4 (nick paul) i need display relations inside record view gui. so
- nick must display:
john, paul - paul must display:
george, nick - john must display:
nick
is correct design handle this? foreign keys should add?
it's many-to-many relationship , it's correct design, in opinion. foreign keys should id people table. answered in part.
Comments
Post a Comment