MongoDB Data Modeling

In database design and object-oriented programming, Data Modeling is a popular term. Data modeling can be defined as the process of creating a conceptual model of how data items relate to each other. The whole process consists of creating a conceptual model than a logical model and at last a physical schema. MongoDB is a NoSQL Database, which is used to store and retrieve data other than tabular relations model, i.e, without using tables and is thus used to store big data and real-time web applications, thus there is a challenge in balancing the need of the application, the performance characteristics of the database engine, and the data retrieval patterns. While designing a schema in MongoDB below points are often kept in mind.

  • Schema are designed according to the user requirements.
  • Joining is done on write operations and not on read operations.
  • Objects should either be combined into one document or should be completely separated.
  • The schema must be optimized for efficient use.
  • In the schema, the aggregation should be complex in nature.
  • Data duplication should be avoided.
Please Share