MongoDB Data Model
Dynamic Schema
Structure of a MongoDB database
- A database has collections.
- A collection has documents.
- Each document in a collection has a unique _id value.
Schemas
- There is no constraint on the structure of a JSON
document in a collection, (except for the _id field).
- Different documents can have different fields and structures.
- A schema can be defined, and optionally associated with a collection.
Documents are validated using the schema.
|