Open In App
Related Articles

How do Document Databases Work?

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

A document database has information retrieved or stored in the form of a document or other words semi-structured database. Since they are non-relational, so they are often referred to as NoSQL data. 

The document database fetches and accumulates data in forms of key-value pairs but here, the values are called as Documents. A document can be stated as a complex data structure. Document here can be a form of text, arrays, strings, JSON, XML, or any such format. The use of nested documents is also very common. It is very effective as most of the data created is usually in the form of JSON and is unstructured.

Advantages

Document databases are both natural and flexible for developers to work with.

  •  They offer higher productivity and faster evolution for a developer. 
  • Document databases are easier to store and query data in a database for a developers by using the same document-model format they use in their application code. 
  • For use cases such as catalogs, user profiles, and content management systems where each document is unique and evolves over time, it is much better to use document model. 
  • Document databases provide flexible indexing, powerful ad hoc queries, and analytics over collections of documents. 

Disadvantages

  • Handling multiple documents is challenging
  • Aggregation operations may not work accurately.

Consider the below example that shows a sample database stored in both Relational and Document Database
 

Don't miss your chance to ride the wave of the data revolution! Every industry is scaling new heights by tapping into the power of data. Sharpen your skills and become a part of the hottest trend in the 21st century.

Dive into the future of technology - explore the Complete Machine Learning and Data Science Program by GeeksforGeeks and stay ahead of the curve.


Last Updated : 08 Jun, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads
Complete Tutorials