title: MongoDB: Populate parent using array of children vs search children by parent ID
body: <p>I'm having an argument with my manager over database structure.</p>
  
  <p>We need to create a parent-type object with multiple children, and query a list of all the children that belong to that parent.</p>
  
  <p>I want to use an array of child ObjectIds in the parent object, which are added when the child is created.  The parent can be found using FindById, and the child list can then by filled using populate().</p>
  
  <p>My manager insists on <em>not</em> storing an array of children in the parent, but only storing the parent's id as a field in each child object, and then get the list by searching for all of the child objects with the parent's id.  He claims that this will be just as fast, since "populate just searches for the object by id anyway".</p>
  
  <p>However, it seems inconceivable to me that it would be just as fast.  Isn't the whole point of an _id field to index the file's location for fast retrieval?  Shouldn't finding a list of objects where you have their _id always be much faster and more scaleable than searching the entire database for objects where a given field matches a given value?</p>
  
  <p>Is there any justification for <em>not</em> using populate in this kind of circumstance?  (Storing a reference to the parent in the child object is, of course, also an option - but he is insistent on <em>not</em> storing an array of children in the parent at all.)</p>