Document Databases refers to a category of NoSQL that represents data in a tree structure, where paths or branches connect data values or leaves. Frequently, Document Stores use XML and JSON formats stores. There are few practical limits to the number of paths, fields, values, or types of data that can be added to specific documents, making document stores more flexible than other NoSQL patterns. See the example of the Document Store above.
Good Document Database Use Cases include:
- Content Management Systems (CMS)
- Middleware Applications that use JSON
Document Stores are not usually considered suitable for applications with complex transactions and/or multiple operations. If a user should be able to do many different actions, from a sophisticated selection, select a different database architecture.
Other Definitions of Document Databases Include:
- “A flexible schema where each document can have a different set of attributes and can be grouped into “business requirement” containers.” (Akshay Pore, DATAVERSITY®)
- “Databases that pair each key with a complex data structure known as a document. Documents can contain many different key-value pairs, or key-array pairs, or even nested documents.” (MongoDB)
- A memory-first architecture ensuring that all operations occur in-memory, optimizing Data Management options. (Couchbase)
- “A database accommodating data that has a significant structure, but not a consistent structure that can be organized into rigid tables.” (Meta S. Brown, Forbes)
- A repository of all incoming and outgoing files, including: import scripts, reports, and specs allowing for detailed views, controlled access or deleted documents. (IBM)
- A store in one structure, called a document, instead of multiple relational structures (i.e. different tables) (Michelle Knight, DATAVERSITY®).
Image Credit: Akshay Pore
Businesses Use Document Databases to:
- Architect a flexible schema with complex querying.
- Make use of JSON/BSON or XML data formats.
- Leverage complex Indexes (multikey, geospatial, full text search etc.).
- Achieve high performance and balanced Read: Write ratio.
Photo Credit: ranjith Ravindran/Shutterstock.com