Before you begin implementing a MongoDB database, you need to understand the nature of the data that is being stored, how that data is going to get stored, and how it is going to be accessed. Understanding these concepts will allow you to make determinations ahead of time and structure the data and your application for optimal performance.
Specifically, you should answer the following questions:
What are the basic objects that the application will be using?
What is the relationship between the different object types: one-to-one, one-to-many, or many-to-many?
How often will new objects be added to the database?
How often will objects be deleted from the database?
How often will objects be changed?
How often will objects be accessed?
How will objects be accessed, by ID, property values, comparisons, etc.?
How will groups of object types be accessed: by common ID, common property value, etc.?
Once you have the answers to these questions, you are ready to consider the structure of collections and documents inside the MongoDB database. The following sections discuss different methods of document, collection, and database modeling you can utilize in MongoDB to optimize data storage and access.