Application design
In this section, we will describe the most useful tips for application design that we have not covered or emphasized enough in the previous chapters.
Schema-less doesn't mean schema design-less
A big part of MongoDB's success can be attributed to the increased popularity of ORM/ODMs. Especially with languages such as JavaScript and the MEAN stack, the developer can use JavaScript from the frontend (Angular/Express) to the backend (Node.js) to the database (MongoDB). This is many times coupled with an Object Document Mapper (ODM) that abstracts away the internals of the database, mapping collections to Node.js models.
The major advantage is that developers don't need to fiddle with database schema design as this is automatically provided by the ODM. The downside is that database collections and schema design are left up to the ODM, which does not have the business domain knowledge of different fields and access patterns.
In the case of MongoDB and other NoSQL-based databases...