Compass Data Modeling ER Diagrams
Parent: MongoDB Compass · Published reference · snapshot 2026-10-23 · skill mongodb-cohort-b63ded16c61f
↓ Facts as markdownall context files
Source-anchored research for Compass Data Modeling ER Diagrams. Run status: COMPLETED.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Structure and components
- Generate a diagram from Data Modeling by choosing a connection, database, name and collections. The database must contain at least one collection with data; planning new collection nodes is possible after a diagram exists. (high confidence) [source]
How it works
- Generated diagrams do not automatically refresh when the underlying data changes; the generation guide requires a new diagram. For a maintained model, choose and document a regeneration process, consistent with Skopx guidance on avoiding divergence between diagrams and databases. The process recommendation is a synthesis, not a built-in scheduling feature. (medium confidence) [source]
How-to and procedures
- Use document-aware modeling for nested and polymorphic data. Skopx identifies Compass among document/NoSQL modeling tools; Compass field editing explicitly allows multiple data types. A relational-looking diagram should not force every nested value into a separate collection. The design advice is a synthesis. (medium confidence) [source]
Problems, failure modes and limitations
- DbSchema's own comparison marks Compass collection/reference diagrams as unavailable, but MongoDB's documentation explicitly describes those diagrams. The comparison includes a caveat to consult current MongoDB documentation, so its omission should not establish a Compass limitation. (medium confidence) [source]
Facts and statements
- Compass Data Modeling generates an entity-relationship diagram of selected collections in one database, showing fields, data types and relationships. Aitor Medrano independently illustrates sampled schema visualization in course material using the Lara project. (high confidence) [source]
- Diagram edits support adding, removing and renaming collections and fields, plus changing field data types. These edits plan a data model without changing the actual database. (high confidence) [source]
- Diagram relationships are annotations. Compass does not store that relationship information in MongoDB, so a drawn relationship must not be interpreted as an enforced foreign-key constraint. (high confidence) [source]
- Automatic relationship inference is optional. The generation guide says Compass identifies references through indexed fields in the selected collections; users can also add relationships manually. (high confidence) [source]
- The generation documentation specifies a configurable sample size, a default of 100 documents per collection, and an All documents option. Larger samples can improve coverage while increasing analysis time and memory use; smaller samples can miss infrequent fields or relationships. This evidence is the undated official page cached on 2026-10-14. (low confidence) (verified as of 2026-10-14) [source]
- Users can add relationships through the side panel or drag and drop. The relationship properties specify local and foreign collections, fields and cardinalities, and the Notes tab can document the relationship. (low confidence) [source]
- A diagram field can have several data types; Compass labels such a field as mixed. Editing this representation does not change the database. (low confidence) [source]
- Export options include a reusable .mdm diagram file, a PNG image and JSON. A collaborator can import an .mdm diagram into Compass to view or edit it. (high confidence) [source]
- JSON diagram export includes a collections array containing collection namespaces and jsonSchema, plus a relationships array containing related collection namespaces and linked fields. Do not treat this exported representation as evidence that Compass applied database changes. (low confidence) [source]
- Aitor Medrano's course material includes a PIIAFP Lara model illustration and describes sampling existing collections and manually modeling collections, attributes, data types and relationships in Compass. (medium confidence) [source]
- The official Compass repository identifies @mongodb-js/compass-data-modeling as the diagram workspace and related services, providing an implementation entry point for investigating diagram behavior. (low confidence) [source]
- Export supports .mdm Diagram Files, PNG images and JSON. The .mdm format supports reopening the diagram in Compass and sharing it with the Atlas data modeling experience; PNG supports visual documentation. (high confidence) [source]
Children
- Compass relationship inference and sampling (frontier)
- Compass diagram interchange and JSON export (frontier)
- Diagram sampling and relationship inference (frontier)
- Relationship cardinality and annotations (frontier)
- Diagram editing and schema planning (frontier)
- MDM, PNG and JSON diagram exchange (frontier)
Frontier under this node: Compass diagram interchange and JSON export, Compass relationship inference and sampling, Diagram editing and schema planning, Diagram sampling and relationship inference, MDM, PNG and JSON diagram exchange, Relationship cardinality and annotations