Search⌘ K
AI Features

Introduction to Data Modeling

Explore the fundamentals of data modeling in MongoDB by learning to design documents and collections that align with application needs. Understand when to use embedding or referencing to create efficient, maintainable, and scalable databases, preparing you to structure your data effectively.

What is data modeling?

Data modeling is the process of organizing and structuring data so it aligns with the application’s needs. It involves:

  • Defining the types of data to store (like users, products, orders).

  • Determining how the data is stored (fields, data types, embedded or separate documents).

  • Specifying how different pieces of data are related.

In MongoDB, data modeling means designing documents (which are JSON-like objects) and organizing them into collections, similar to how relational databases use rows and tables. A good data model is like a solid foundation for a ...