Glossary · Databases

Document Database

A document database stores records as self-contained JSON-like documents, letting each record hold nested data and vary in structure.

Updated October 6, 2026

A document database is a NoSQL database that stores each record as a self-describing document, usually JSON or a similar format, which can contain nested fields and arrays.

Why it matters

Documents map naturally to objects in application code, and related data can be embedded together so one read returns everything needed. That removes many joins and suits catalogs, content management, and user profiles. The trade-off is duplicated data and weaker support for cross-document relationships, so modeling around your access patterns is essential.

Example

{
  "_id": "order-1001",
  "customer": { "id": 7, "name": "Ravi" },
  "items": [
    { "sku": "A-100", "qty": 2 },
    { "sku": "B-220", "qty": 1 }
  ]
}

In a relational model this order would span three tables.

Common mistakes

  • Embedding data that is also edited elsewhere, causing stale copies.
  • Letting documents grow endlessly, such as an ever-expanding array of events.
  • Treating schemaless as meaning no validation. Use schema validation rules where available.

Get notified when this term updates

Plus occasional practical tips on uptime and monitoring, nothing else. Unsubscribe anytime.

This page is general information written by our editorial team and updated when documentation changes. Servers and providers differ, so test changes safely first. See our editorial policy and disclaimer.