title: Forum Model For MongoDB
body: <p>So I am creating a model for a forum. Think thread and a bunch of comments where. Thread has many comments. In RDBMS world, I would design this as such</p>
  
  <pre><code>Thread --has many--&gt; Comment
  id                   id
  user_id              thread_id
                       user_id 
  </code></pre>
  
  <p>Now, I guess, with this, the data/schema would follow one of the many normal forms (I forgot which). And I think this is the most sensical way to do it. However, when it comes to doing this in NoSQL world (MongoDB), what would be the best way to design this relationship? I could almost do it in the RDBMS way, but I would lose the advantage of using embedded object. For some reason, I am more inclined to do it like</p>
  
  <pre><code>Thread
  _id
  user_id
  comments =&gt; [{_id, user_id, body, created_at}]
  </code></pre>
  
  <p>What would be the most sensical way to do this I guess that's what I am asking. And why?</p>