I\'m creating a table for allowing website users to become friends. I\'m trying to determine which is the best table design to store and return a user\'s friends. The goal i
The first method is better in just about every way. Not only will you utilize your DBs indexes to find records faster, it will make modification far far easier.
First method is definitely better. It's what makes relational databases great :)
It will allow you to search for and group by much more specific criteria than the 2nd method.
Say you wanted to write a query so users could see who had them as a friend. The 2nd method would require you to use IN() and would be much slower than simply using JOINS.
Use the power of the relational database. Definitely go with the first approach. MySQL is faster than you think, and it regularly deals with VERY large datasets.
Breaking from 1st normal form is usually not desirable because