title: Trying to understand the use of the populate method
body: <p>I see that one way we use populate is to put one document from another collection into a "parent" collection. I was just going through <a href="https://stackoverflow.com/questions/34984199/why-wont-my-refs-populate-documents">this</a> question and I was hoping someone could explain the answer to me better. And show me a practical use. Here is an example from the answer.</p>
  
  <pre><code>var PersonSchema = new mongoose.Schema({
      t: String
  }, {collection: 'persons'});
  
  var User = mongoose.model('User', PersonSchema.extend({
    _id: String,
    name: String
  }));
  
  var ParentSchema = new mongoose.Schema({
      s: String
  }, {collection: 'parent'});
  
  var Like = mongoose.model('Like', ParentSchema.extend({
    _id: String,
    user_id: {
      type: String,
      ref: 'User'
    }
  }));
  </code></pre>
  
  <p>Insert Data into DB,</p>
  
  <pre><code>var user = new User({
      t: 't1',
      _id: '1234567',
      name: 'test'
  });
  
  var like = new Like({
      s: 's1',
      _id: '23456789',
  });
  
  user.save(function(err, u){
      if(err)
          console.log(err);
      else {
          like.user_id = u._id;
          console.log(like);
          like.save(function(err) {
              if (err)
                  console.log(err);
              else
                  console.log('save like and user....');
          });
      }
  });
  </code></pre>
  
  <p>Query by</p>
  
  <pre><code>Like.findOne({}).populate('user_id').exec(function(err, doc) {
      if (err)
          console.log(err);
      else
          console.log(doc);
  });
  </code></pre>
  
  <p>And the result is</p>
  
  <pre><code>{ _id: '23456789',
    __t: 'Like',
    user_id: { _id: '1234567', __t: 'User', t: 't1', name: 'test', __v: 0 },
    s: 's1',
    __v: 0 }
  </code></pre>
  
  <p>QUESTION </p>
  
  <ol>
  <li>where does <code>__t: 'User'</code> come from?</li>
  <li>I was thinking that using populate() or ref that would separate the collections but it looks like at the end the like collection has the users document in it. I think I wanted to use populate so I could make a document smaller. 
  3.Also if someone really wanted to help explain this to me I have an example that I have been trying to do and I don't know if I should use populate but if I should it would be great if you show me how. Here is the example.</li>
  </ol>
  
  <p>You have </p>
  
  <ol>
  <li>doctors </li>
  <li>patients </li>
  <li>information about the practice</li>
  </ol>
  
  <p>There could be like a 1000 doctors and lots of patients for each doctor. and the information will be about their practice(like how many employees they have). so I feel that there should be a separation of concern.(one reason is to prevent a single document for a patient from getting to big). So If we're going with the populate method If you could explain how to set it up for this case. I guess I could have a doctor as a parent and a child  refs for patients and another child refs for information about practice. so maybe there should be an array of objectId for the patients and an array for Other information</p>