title: Many to many relationship in MongoDB when we have specific fields
body: <p><a href="http://blog.markstarkman.com/blog/2011/09/15/mongodb-many-to-many-relationship-data-modeling/" rel="nofollow noreferrer">As this article suggests</a> for many-to-many relationship we can save objectId on both collections(lets say user, course). The problem is that I have some specific fields for user who has taken the course like his progress on this course. In the above approach it cannot help much.</p>
  
  <p>I've also read <a href="https://stackoverflow.com/questions/4662530/how-should-i-implement-this-schema-in-mongodb">this useful stackoverflow question</a>, but here clicks is a top-level entity and has its own collection.</p>
  
  <p>I have <code>course</code> &amp; <code>user</code> collections and I have specific field like <code>user_progress_on_course</code>, <code>purchased_on</code>, <code>user_notes</code>, etc.</p>
  
  <p>The question is should I take the SQL approach to have junction table to store fields mentioned above?</p>
  
  <hr>
  
  <p><strong>EDIT1:</strong><br>
  One of the approaches can be as below, having user_course collection:<br>
  <img src="https://i.stack.imgur.com/blnxY.png" alt="User course collection"></p>
  
  <p>The other approach is to embed <code>user_course</code> into user collection. As each user has at most 100 course which is ok to have then inside of <code>user</code> collection. So this design can be as below:  </p>
  
  <p><img src="https://i.stack.imgur.com/htpYb.png" alt="Embedded document for course in user collection"></p>
  
  <p>Now how do you suggest designing collections? What approach do you take? why?</p>