MongoDB considerations
In Chapter 2, Setting Up the Database with MongoDB, you were introduced to MongoDB to get you started with simpler projects. However, MongoDB is a complex ecosystem employed by enterprise-level companies. Therefore, diving deeper into its features and patterns will benefit you as a developer and help you understand the NoSQL paradigm.
One of the first steps in employing MongoDB is understanding data modeling or schema design. Your data model should reflect how your application will see the data and its flow, starting from the queries you make. There are advanced design patterns that apply to MongoDB schemas that are beyond the scope of this book.
Chapter 2, Setting Up the Database with MongoDB, covered some popular MongoDB document modeling best practices. The following list provides more tips:
- Objects should be combined in the same document if they are meant to be used together. The quote “Data that is accessed together, stays together&...