I wondered how a table should be structured when there is going to be more than one value for a certain field. For example, If I have a user who has 10 friends should there be a table that has 10 rows with the user’s name and a different friend on each row or should there be one row with the user’s name and all the friends put into one? Thanks, the answers will help a lot.
Share
You should make a many-to-many table that links the foreign keys together of two people who are friends. So if
Personis the entity you are using, you wouldn’t want to constrain the structure by introducing limitations such as 10 friends into a single row.