The ERd model

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 constructMeaning in MongoDB
EntityA 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 attributeA subdocument; nested composites form a tree of fields
IdentifierThe key of the document, mapped to _id or kept as a mandatory field
GeneralizationDocuments of different kinds in one collection, distinguished by a Type field
Time entityEvents over time, grouped into buckets
RelationshipEmbedding, 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.