What Are Document Databases
A document database is a NoSQL data stores that is designed to store and
query data as JSON-like documents. The data in document databases is
stored as documents with their metadata. The document stored is in
key/value pair where the key is the unique identifier of the document.
Unlike relational databases, document databases are faster to load,
access, and parse.
Document database are also referred as document database management
systems, document-oriented databases, or document store database.
Here are the key characteristics of document databases:
1. Document DBMSs are NoSQL databases.
2. Document DBMSs use key/value to store and access documents
data.
3. Document DBMSs have a flexible schema that can be different
for each document. For example, one document can be an
Author profile, while other document can be a blog.
4. Common examples of document DBMS include JSON, XML docs,
Catalogs, serialized PDFs and Excel docs, Profile data, and
serialized objects.
Document database example
Here is a document that stores a book data. As you can see from this
document, it’s a JSON document that has tags and values that defines a
book including year published, book title, author, release date, publisher,
and price.
[{
"year":2001,
"title":"AProgrammer'sGuidetoADO.NET",
"info":{
"author":"MaheshChand",
"release_date":"2001-02-01",
"publisher":"APress",
"price":"44.95",
"image_url":"ADOBook.jpg"
}
},{
"year":2003,
"title":"GDI+Programming",
"info":{
"author":"MaheshChand",
"release_date":"2003-03-01",
"publisher":"AddisonWesley",
"price":"49.95",
"image_url":"GDIPlusBook.jpg"
}
}]
When to use document databases
Traditional relational DBMSs are not designed to provide efficient access
to large documents or unstructured data. In case of catalogs, or profiles,
or document storages, we don’t need structured design. For example,
storing a document in a CMS does not require a structured format.
Document databases are designed to store large documents in a
key/value store that are easy to search and access. The entire document
is read into a memory object that is easy to read and present.
Here is a list of 7 popular document databases.
MongoDB is one of the most popular document databases. MongoDB is
distributed database at its core, so high availability, horizontal scaling,
geographic distribution are built in and easy to use. MongoDB stores da
1MongoDB
JSON-like documents, meaning fields can vary from document to docum
structure can be changed over time. The document model maps to the
your application code, making data easy to work with.
Azure Cosmos DB is Microsoft's globally distributed, multi-model datab
With a click of a button, Cosmos DB enables you to elastically and inde
scale throughput and storage across any number of Azure regions worl
2Cosmos DB
elastically scale throughput and storage, and take advantage of fast, s
millisecond data access using your favorite API including SQL, MongoD
Tables, or Gremlin.
ArangoDB is a multi-model database and provides support of graph, do
3ArangoDB
key/value, columnar, and relational data models.
Built on the most powerful NoSQL technology, Couchbase Server delive
unparalleled performance at scale, in any cloud. With features like mem
architecture, geo-distributed deployments, and workload isolation, Cou
Couchbase
4 excels at supporting mission-critical applications at scale while maintai
Server
submillisecond latencies and 99.999% availability. Plus, with the most
SQL-compatible query language (N1QL), migrating from RDBMS to Cou
is easy with ANSI joins.
Apache CouchDB is an open-source document-oriented NoSQL databas
5CouchDB implemented in the concurrency-oriented language Erlang; it uses JSON
JavaScript as its query language using MapReduce, and HTTP for an AP
Amazon DocumentDB is a fast, scalable, highly available, and fully man
Amazon document database service that supports MongoDB workloads. Amazo
6
DocumentDB is designed from the ground-up to give you the performance, scalabilit
availability you need when operating mission-critical MongoDB workloa
Elasticsearch is a distributed, RESTful search and analytics engine capa
7Elasticsearch a growing number of use cases. As the heart of the Elastic Stack, it cen
your data so you can discover the expected and uncover the unexpect