Document Database

Definition

NoSQL database that stores data in document format, typically JSON-like structures, allowing for flexible and scalable data management.

Use Cases

Provider Equivalents

Frequently Asked Questions

What's the difference between a document database and a relational database?
A document database stores data as documents (often JSON-like), where each record can have different fields. A relational database stores data in tables with a fixed schema (columns) and uses joins to relate tables. Document databases are often easier for rapidly changing or semi-structured data, while relational databases excel at complex transactions and strict consistency across many related tables.
When should I use a document database?
Use a document database when your data is naturally JSON-like, varies between records, or changes frequently (for example: user profiles, product catalogs, content management, event data). It’s also a good fit when you want to retrieve an entire object in one read (for example, a full article with metadata) and scale reads/writes horizontally. If you need many multi-table joins and highly normalized data, consider a relational database instead.
How much does a document database cost?
Cost depends on the managed service and your workload. Common pricing factors include: provisioned or serverless compute capacity, storage size, read/write operations (request units or IOPS), data transfer, backups, and multi-region replication. For example, services like Azure Cosmos DB price by throughput (RU/s) or serverless request usage, while others price by instance size plus storage and I/O. Estimate cost by measuring expected document size, read/write rate, indexing needs, and replication requirements.

Category: data

Difficulty: intermediate

Related Terms

See Also