title: Single or Multiple Entities Per Collection in DocumentDB
body: <p>Should there be one entity per collection in document DB?</p>
  
  <p>Consider I have foreign key relationship in below diagram:
  <img src="https://i.stack.imgur.com/HKGPp.png" alt="enter image description here"></p>
  
  <p>Should I create two collections one for employee &amp; other for company. Or should I store them into a single collection?</p>
  
  <p>I read <a href="http://azure.microsoft.com/en-us/documentation/articles/documentdb-resources/">here</a> that in documentdb scope of stored procedures triggers etc are within a collection. So by splitting differetn entities into separate collection I loose out of box functionality.</p>
  
  <p>So wouldn't it be better to dump both the classes as single entity as below:</p>
  
  <pre><code>{
    "Id": 1001,
    "Industry": "Software",
    "Employees": [
      {
        "Id": 10011,
        "Name": "John Doe",
        "CompanyId": 1001
      },
      {
        "Id": 10012,
        "Name": "Jane Doe",
        "CompanyId": 1001
      }
    ]
  }
  </code></pre>
  
  <p>What is the standard practise of implementing related entities in DocumentDB?</p>