The schema design process helps you identify the data your application needs and organize it to optimize performance.
Use Cases
Plan and design your schema early in the development process. This helps prevent performance issues as your application grows.
MongoDB's flexible schema allows you to design your schema iteratively. However, it can still be difficult to modify large-scale schemas that are used in production. Depending on your application, you may want to establish a simple schema to cover basic functionality before optimizing.
Tasks
The schema design process consists of the following steps:
Identify your workload
Identify the operations that your application runs most frequently. See Identify Application Workload.
Map relationships
Identify the relationships in your application's data and decide whether to link or embed related data. See Map Schema Relationships.
Apply design patterns
Apply schema design patterns to optimize reads and writes. See Apply Design Patterns.
Create indexes
Create indexes to support common query patterns. See Create Indexes to Support Your Queries.