title: Social network site database development
body: <p>How to manage social network site database perfectly?</p>
  
  <p>I recently start building a social network site database below is my concept of database</p>
  
  <p>Is this is correct or you suggests something else and why</p>
  
  <p>1."user" table stores user details</p>
  
  <p>2."posts" tables stores posts of all user with the user unique id</p>
  
  <p>3."likes" table stores the likes of each posts separately with user, post and comment unique id </p>
  
  <p>4."friends" tables stores the 50001 user ids one id of user and 5000 ids of his/er friends in separate column means 5001 fields is it ok ?</p>
  
  <p>5."comments" table stores comment of all posts which uniques ids of user, post and comment</p>
  
  <p>and all table loads some data on profile.php where user can able to post, like, comment</p>
  
  <p>here is the things which profile.php file do on load</p>
  
  <ol>
  <li>Shows post input box with submit button</li>
  <li>Shows 10 posts in iframe</li>
  <li>calculate and show likes, comments on each post</li>
  </ol>
  
  <p>Is this is ok to count the total likes and comments default on any post? and when user click on likes or comments 
   than show him/er the list of peoples who's likes or comments on his/er post? is the above type of database handle this query ? and whats the speed of this process fast/normal/slow ? and "select" command is enough and work fine for this query?
  Note: I use PHP, MySQL and JavaScript </p>
  
  <p>Please accept my apologize for low formatting and weak English but i try my best</p>
  
  <p>Thank you so much </p>