Question - What are the points we should consider while creating a schema in MongoDB?
Answer -
We must consider the following points while creating a schema:
- Designing the Scheme based on the user requirements.
- Combining the objects into one document, if we have to use them jointly, or else, separate them.
- Perform joins while on write, and not while it is reading.
- For most general application scenarios, maximize the schema.
- Perform complex aggregations in the schema.