title: Data modeling for comments for posts
body: <p>I'm working on a publishing tool that has a similar structure to blogs, with a user having many posts and posts having comments, and comments each having its owner, etc.</p>
  
  <p>I don't plan to utilize comments in any aggregate way, which means comments will be just displayed when people view the corresponding post, but won't do much else.</p>
  
  <p>I'm thinking about just storing all the comments as a JSON of {timestamp:{user:comment}} items, so for example, like this:</p>
  
  <blockquote>
    <p>{{"01-04-12-08" : {"John" : "Hey cool!"} }, {"01-04-12-15":{"Mary" : "No it's not"}}, ... }</p>
  </blockquote>
  
  <p>Instead of using database tables, it would store the entire data structure as a string, and then later turn it back to JSON when it's needed.</p>
  
  <p>Is it a right way to do something like this? Or should I create database tables? I just felt like creating tables and associations was a bit of an overkill since these comments won't be utilized so much other than just being displayed for each post. Maybe it's not?</p>