ERd adapts classic ER constructs, translating them into precise definitions for the world of document databases.
While every instance in the classic ER model must share the same attributes, ERd introduces partially homogeneous entities supporting optional fields.
| ERd construct | Meaning in MongoDB |
|---|---|
| Entity | A collection, one document per occurrence |
| Optional attribute (0,1) | A field that may be missing in some documents |
| Multivalued attribute (x,N) | An array |
| Composite attribute | A subdocument; nested composites form a tree of fields |
| Identifier | The key of the document, mapped to _id or kept as a mandatory field |
| Generalization | Documents of different kinds in one collection, distinguished by a Type field |
| Time entity | Events over time, grouped into buckets |
| Relationship | Embedding, referencing, extended referencing, subset or tree, chosen during translation |
Relationships keep the minimum and maximum cardinality for each participating entity. The minimum indicates whether participation is mandatory, while the maximum defines whether an instance can be linked to one or multiple instances of the other entity. These two values determine the patterns offered by NoER.