title: How to include different catalogs in a query in MongoDB?
body: <p>Suppose I have different documents in different collections:</p>
  
  <p>On <strong>cars</strong>:</p>
  
  <pre><code>{ "_id": 32534534, "color": "red", ... }
  </code></pre>
  
  <p>On <strong>houses</strong>:</p>
  
  <pre><code>{ "_id": 93867, "city": "Xanadu", ... }
  </code></pre>
  
  <p>How can I retrieve the corresponding document to the documents below, in <strong>people</strong>:</p>
  
  <pre><code>{ "name": "Alonso", "owns": [32534534], ... }
  { "name": "Kublai Khan", "owns": [93867], ... }
  </code></pre>
  
  <hr>
  
  <p>Can I use something like the code below?
  (Note that I'm not specifying a catalog)</p>
  
  <pre><code>db.find({'_id': 93867})
  </code></pre>
  
  <p>If not, what would you suggest to achieve this efect?</p>
  
  <hr>
  
  <p>I have just found this related question: <a href="https://stackoverflow.com/questions/3745566/mongodb-cross-collection-queries">MongoDB: cross-collection queries</a></p>