title: Storing Friends in Database for Social Network
body: <p>For storing friends relationships in social networks, is it better to have another table with columns <code>relationship_id, user1_id, user2_id, time_created, pending</code> or should the confirmed friend's user_id be seralized/imploded into a single long string and stored along side with the other user details like <code>user_id, name, dateofbirth, address</code> and limit to like only 5000 friends similar to facebook?</p>
  
  <p>Are there any better methods? The first method will create a huge table! The second one has one column with really long string...</p>
  
  <p>On the profile page of each user, all his friends need to be retrieved from database to show like 30 friends similar to facebook, so i think the first method of using a seperate table will cause a huge amount of database queries?</p>