I'm setting up a database and I'm interested in having a facebook-like friends system. My original plan was to have a table like so:
uid friends
4 30,23,12,33
30 54,92,108
with all these numbers being FK's to tables with user information. I was told that this is inadvisable and practically impossible since MySQL will only deal with FK's well if they're the only placed one in a cell. So maybe something like this?
uid(PK) friend
4 30
4 23
4 12
30 54
30 92
30 108
ect. Won't this leave me with an enormous number of rows? (tens of thousands?) Is the first technique not worth it in terms of time and efficiency?