title: nosql shema store design
body: <p>i have a doubt.its about how the data to be stored in the mongodb.Actually i am learning mongodb with nodejs and express.i am building an delivery application.
  i need to store daily orders.with date
  <strong>1st case</strong></p>
  <p>for easier querying i made something like <code>date</code> as key and orders details as array</p>
  <pre><code>'2014-10-27': [{name, amount, ....}, {name, amount, ....}]
  
  
  order = {name, amount, ....}
  </code></pre>
  <p>so it will be easy for me to get every orders for that day.</p>
  <p><strong>2nd case</strong></p>
  <p>create schema called orders and putting date as a field in the schema and indexing it so it will be easy for me to query.</p>
  <pre><code>[{name,amount, date}, {name, amount, date}]
  </code></pre>
  <p>which schema will be good for handling lots of data.i personally think <strong>1st case</strong> will be much more flexible.but still in a confusion to put  reference or actual object .sorry if i am wrong.i am still learning. i need some help from you guys to strengthen my learning. if the data become more which schema provide a good solution.</p>
  <p>and if you guys feels like this is bad approach please help with your idea about the design.</p>