Generate a visualization of your data model as an entity-relationship diagram in Atlas. Entity-relationship diagrams can help you understand and document the relationships between data in your database and plan changes to your schema.
Atlas generates an entity-relationship diagram based on a small sample of documents from each collection you select in your database. Due to this sampling, your diagram might not reflect all fields or relationships in your data.
If you make any changes to your data after you generate a diagram, Atlas doesn't automatically update the diagram. You must create a new diagram to see your changes.
Before You Generate an Entity-Relationship Diagram
To generate an entity-relationship diagram in Atlas, your database must have at least one collection with data.
Procedure
In Atlas, go to the Data Explorer page for your project.
If it's not already displayed, select the organization that contains your project from the Organizations menu in the navigation bar.
If it's not already displayed, select your project from the Projects menu in the navigation bar.
In the sidebar, click Data Explorer under the Database heading.
The Data Explorer displays.
Note
You can also go to the Clusters page, and click Data Explorer under the Shortcuts heading.
(Optional) Choose if Atlas automatically infers relationships between collections.
In the Select collections modal, you can choose whether you want Atlas to Automatically infer relationships between collections. When enabled, Atlas analyzes the selected collections and adds relationships based on indexed fields that contain references to other collections.
You can also manually add and edit relationships after you generate your diagram.
Note
Relationships are for annotation purposes only. Atlas does not store relationship information in your MongoDB database.