liveBook · Manning

Document-oriented data model

As explained in MongoDB 8.0 in Action, Third Edition

A document-oriented data model represents records as self-contained documents, typically with nested and variably structured fields.

A document-oriented data model stores records as self-contained documents, allowing flexible fields and nested information. MongoDB uses this structure to support varied applications and efficient distribution across servers. section 1.0 section 1.2

The model is especially useful when applications must scale beyond a single server:

  • Self-contained documents reduce dependence on complex joins common in relational databases. section 1.2
  • MongoDB can distribute documents across shards, route queries to the appropriate server, and rebalance data as machines are added. section 1.2
  • Scaling out adds machines and capacity, while scaling up remains constrained by server cost and physical limits; scaling out also increases management complexity. section 1.2

Application fit

A high-volume application can keep related information together in documents and distribute those documents across a sharded cluster. MongoDB applies the same broader platform to use cases such as faster e-commerce lookups, chat range queries, analytics dashboards, real-time stock updates, and geospatial mapping. section 1.0 section 1.2

Figure 1.1 MongoDB’s sharding architecture enables horizontal scaling by distributing data across multiple servers. (Image © MongoDB 2024 CC BY-NC-SA 3.0)
A diagram of a computer program

Description automatically generated

Use the architecture diagram to trace how applications and drivers reach query routers, shards, and the distributed data layer. section 1.2

How MongoDB 8.0 in Action, Third Edition covers it

How deep it goes
Explains document independence, reduced joins, query routing, and sharding, stopping at the distribution rationale and cluster architecture.
Examples
Uses e-commerce lookups, chat queries, analytics dashboards, stock updates, and geospatial mapping as application contexts.
What you can do after
Evaluate when self-contained documents and horizontal distribution fit an application’s performance and growth requirements.
How it connects
Connects document modeling with sharding, horizontal scaling, relational joins, secondary indexes, and query routing.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of MongoDB 8.0 in Action, Third Edition. The section links point to the parts of the book it draws on.