title: Multi room chat database with mongoDB (mongoose)
body: <p>I need to set a scheme for a multi room chat which uses mongodb for storage. I'm currently using <strong><em>mongoose v2</em></strong> and I've thought of the following methods:</p>
  
  <p><strong>Method 1</strong></p>
  
  <ul>
  <li>Each chat log (each room) has its own mongo <strong>collection</strong></li>
  <li>Each chat log collection is populated by documents (schema) <strong><em>message</em></strong> with from, to, message and time.</li>
  <li>There is the <strong>user collection</strong></li>
  <li>The user collection is populated by documents (schema) <strong><em>user</em></strong> (with info regarding the user)</li>
  <li><strong>Doubts:</strong> </li>
  </ul>
  
  <p><strong>1</strong> How exactly can I retrieve the documents from a <strong>specific</strong> collection (the chat room)?</p>
  
  <p><strong>Method 2</strong></p>
  
  <ul>
  <li>There is a collection (<strong>chat_logs</strong>)</li>
  <li>The collection chat_logs is pop. by documents (schema) <strong><em>message</em></strong> with from, <strong>to</strong> (chatroom), user, etc...</li>
  <li>There is the user collection, as above.</li>
  <li><strong>Doubts:</strong></li>
  </ul>
  
  <p><strong>1</strong> Is there a max size for collections?</p>
  
  <p>Any advice is welcome... thank you for your help.</p>