What should all points be taken into consideration while creating a schema in mongodb?



What should all points be taken into consideration while creating a schema in mongodb?..

Answer / Neelambuj Kumar Shrivastava

When creating a schema in MongoDB, consider the following points:
1. Data structure: Ensure your data model is properly designed to meet the needs of your application.
2. Normalization: Use denormalization when necessary to avoid joining multiple collections and improve performance.
3. Indexes: Add appropriate indexes to speed up queries on frequently accessed fields.
4. Validation: Use validation rules to ensure data integrity and enforce business logic.
5. Performance: Optimize your schema for efficient data storage and querying.
6. Scalability: Design your schema with sharding in mind, if needed.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MongoDB Interview Questions

Is mongodb a framework?

1 Answers  


What is mongodb replica set?

1 Answers  


What is morphia mongodb?

1 Answers  


What is orm mongodb?

1 Answers  


What is difference between hadoop and mongodb?

1 Answers  


How does mongodb sharding work?

1 Answers  


Why would you choose mongodb?

1 Answers  


What is the difference between $lt and $lte?

1 Answers  


What is the difference between mongodb and redis database?

1 Answers  


What are the best features of mongodb?

1 Answers  


Is mongodb the same as nosql?

1 Answers  


Does mongodb support acid transactions?

1 Answers  


Categories