What is a Document Database?
A document database (also known as a document-oriented database or a document store) is a database that stores information in documents.
FAQs
Document databases are general-purpose databases that can be used in a variety of use cases across industries. Visit When to Use NoSQL to learn more.
Yes, MongoDB is a general-purpose document database.
MongoDB is the world's most popular document database. Other examples of document databases include CouchDB and Firebase.
Document databases store information in documents. Document databases have rich APIs and query languages that can be used to execute the CRUD (create, read, update, and delete) operations. They have flexible schemas, allowing developers to easily evolve their data models as their application requirements change.
Document databases store information in documents. Each document typically contains information about one object and any related metadata. Documents with similar contents are grouped together in collections. Groups of collections are stored in databases.
In MongoDB, the first field in every document is named _id. The _id field serves as a unique identifier for the document. See the official MongoDB documentation for more information.
Note that each document database management system has its own field requirements.
MongoDB stores data in BSON (Binary JSON) documents.
Yes, MongoDB has two free options:
- MongoDB Atlas, MongoDB's developer data platform, has a generous, forever-free option that is great for experimenting and learning to use MongoDB.
- If you prefer to self-host MongoDB, you can use MongoDB Community Server in accordance with the Server Side Public License (SSPL).
The most obvious difference between a document database and a relational database is the way data is modeled. Document databases typically model data using flexible JSON-like documents with field-value pairs. Relational databases typically model data using rigid tables with fixed rows and columns.
Get started with Atlas today
- 125+ regions worldwide
- Sample data sets
- Always-on authentication
- End-to-end encryption
- Command line tools