title: MongoDB Schema Design - Many small documents or fewer large documents?
body: <p><strong>Background</strong><br>
  I'm prototyping a conversion from our RDBMS database to MongoDB. While denormalizing, it seems as if I have two choices, one which leads to many (millions) of smaller documents or one which leads to fewer (hundreds of thousands) large documents.</p>
  
  <p>If I could distill it down to a simple analog, it would be the difference between a collection with fewer Customer documents like this (in Java):</p>
  
  <pre>
  class Customer {
      private String name;
      private Address address;
      // each CreditCard has hundreds of Payment instances
      private Set&lt;CreditCard&gt; creditCards;
  }
  </pre>
  
  <p>or a collection with many, many Payment documents like this:</p>
  
  <pre>
  class Payment {
      private Customer customer;
      private CreditCard creditCard;
      private Date payDate;
      private float payAmount;
  }
  </pre>
  
  <p><strong>Question</strong><br>
  Is MongoDB designed to prefer many, many small documents or fewer large documents? Does the answer mostly depend on what queries I plan on running? (i.e. How many credit cards does customer X have? vs What was the average amount all customers paid last month?)</p>
  
  <p>I've looked around a lot but I didn't stumble into any MongoDB schema best practices that would help me answer my question.</p>