title: How to design database for blog system?
body: <p>I am developing a simple blog application in which users can write posts and others can like, comment, share etc. i am facing difficulty in designing database.
  What I have tried is:</p>
  
  <pre><code>user (user_id(pk), user_name)
  
  post (post_id(pk), post_content, likes, user_id(fk))
  
  comment(comment_id(pk), comment, post_id(fk))
  </code></pre>
  
  <p>PROBLEM: One user can have many posts and many users can like and comment on many posts. Whether I have to separate two tables like: <code>user</code>, <code>post</code> and <code>userpost</code>?</p>
  
  <p>Can anyone tell me if anything wrong in this design?</p>