Safekipedia

Document-oriented database

Adapted from Wikipedia · Discoverer experience

A document-oriented database, or document store, is a computer program and data storage system designed for storing, retrieving, and managing document-oriented information, also known as semi-structured data. These databases are one of the main categories of NoSQL databases, and their popularity has grown along with the use of NoSQL technologies.

Document-oriented databases are conceptually an extension of the key–value store, another type of NoSQL database. While key-value stores treat data as simple pairs, document-oriented systems look inside the documents to find useful information, called metadata, which helps make storing and searching data more efficient.

Unlike traditional relational databases (RDBs), which store data in separate tables, document databases keep all information about an object in one place. Each document can have its own unique structure, which makes it easier to work with modern programming techniques without needing extra steps to organize the data.

Documents

The main idea behind a document-oriented database is the document. These databases treat documents as complete units that hold data in a standard format, such as XML, YAML, JSON, or binary forms like BSON.

Documents are like objects in programming. They don’t need to follow the same structure, and each one can have different pieces of information. For example, one document might have a person’s name and address, while another might also include their phone numbers and hobbies. This flexibility means you can add new details to some documents without changing others.

Document databases let you add, find, change, or remove documents, known as Create, Read, Update, and Delete (CRUD). Each document has a special identifier that helps you find it quickly. You can also search for documents based on what they contain, not just their identifier. This makes it easier to find specific information, like all phone numbers with “555” in them, without getting mixed up with similar-looking postal codes.

Documents can be organized in different ways, such as in groups called collections, with tags, or in folder-like structures. These methods help keep documents organized, whether they’re stored on a computer’s hard drive or in memory.

Relationship to other databases

A document-oriented database is a special type of key-value store, which is a kind of NoSQL database. In a simple key-value store, the data is kept without much organization. But a document-oriented database lets users search and change the data based on what’s inside each document. For people who don’t need advanced searching, the difference between the two might not matter much.

Some search tools like Apache Solr and Elasticsearch can also store documents and do basic tasks with them, even though they were made for searching mainly.

In a relational database, data is kept in tables with rows and columns, all following the same setup. But in a document-oriented database, all the information about one thing is kept together in a single document. For example, in an address book, a person’s name, picture, and contact details can all be in one document. This makes it easier to get all the information at once, without joining many tables together.

Unlike relational databases, document-oriented databases don’t need a fixed setup. New information can be added to documents without changing older ones. They also let administrators give hints to help find certain types of information, similar to indexes in relational databases. This makes it easier to get related data, like all entries in an address book, without needing to organize them into tables.

Implementations

Main category: Document-oriented databases

XML database implementations

Further information: XML database

Many XML databases are types of document-oriented databases.

NamePublisherLicenseLanguages supportedRESTful API
AerospikeAerospikeAGPL and ProprietaryC, C#, Java, Scala, Python, Node.js, PHP, Go, Rust, Spring FrameworkYes
AllegroGraphFranz, Inc.ProprietaryJava, Python, Common Lisp, Ruby, Scala, C#, PerlYes
ArangoDBArangoDBBusiness Source LicenceC, C#, Java, Python, Node.js, PHP, Scala, Go, Ruby, ElixirYes
BaseXBaseX TeamBSD LicenseJava, XQueryYes
CachéInterSystems CorporationProprietaryJava, C#, Node.jsYes
CloudantCloudant, Inc.ProprietaryErlang, Java, Scala, and CYes
Clusterpoint DatabaseClusterpoint Ltd.Proprietary with free downloadJavaScript, SQL, PHP, C#, Java, Python, Node.js, C, C++,Yes
Couchbase ServerCouchbase, Inc.Business Source LicenceC, C#, Java, Python, Node.js, PHP, SQL, Go, Spring Framework, LINQYes
CouchDBApache Software FoundationApache LicenseAny language that can make HTTP requestsYes
CrateDBCrate.io, Inc.Apache LicenseJavaYes
Cosmos DBMicrosoftProprietaryC#, Java, Python, Node.js, JavaScript, SQLYes
DocumentDBAmazon Web ServicesProprietary online servicevarious, RESTYes
DynamoDBAmazon Web ServicesProprietaryJava, JavaScript, Node.js, Go, C# .NET, Perl, PHP, Python, Ruby, Rust, Haskell, Erlang, Django, and GrailsYes
ElasticsearchShay BanonDual-licensed under Server Side Public License and Elastic license.JavaYes
eXisteXistLGPLXQuery, JavaYes
InformixIBMProprietary, with no-cost editionsVarious (Compatible with MongoDB API)Yes
JackrabbitApache FoundationApache LicenseJava?
HCL Notes (HCL Domino)HCLProprietaryLotusScript, Java, Notes Formula LanguageYes
MarkLogicMarkLogic CorporationProprietary with free developer downloadJava, JavaScript, Node.js, XQuery, SPARQL, XSLT, C++Yes
MongoDBMongoDB, IncServer Side Public License for the DBMS, Apache 2 License for the client driversC, C++, C#, Java, Kotlin, Perl, PHP, Python, Go, Node.js, Ruby, Rust, Scala, SwiftYes
MUMPS Database?Proprietary and AGPLMUMPS?
ObjectDatabase++Ekky SoftwareProprietaryC++, C#, TScript?
OpenLink VirtuosoOpenLink SoftwareGPLv2 and ProprietaryC++, C#, Java, SPARQLYes
OrientDBOrient TechnologiesApache LicenseJavaYes
Oracle NoSQL DatabaseOracle CorpApache License and ProprietaryC, C#, Java, Python, node.js, GoYes
QizxQualcommProprietaryREST, Java, XQuery, XSLT, C, C++, PythonYes
RavenDBRavenDB Ltd.AGPL, commercial and freeC#, C++, Java, NodeJS, Python, Ruby, PHP and GoYes
RedisJSONRedisRedis Source Available License (RSAL)PythonYes
RethinkDB?Apache LicenseC++, Python, JavaScript, Ruby, JavaNo
SAP HANASAPProprietarySQL-like languageYes
Sednasedna.orgApache LicenseC++, XQueryNo
SimpleDBAmazon Web ServicesProprietary online serviceErlang?
Apache SolrApache Software FoundationApache LicenseJavaYes
TerminusDBTerminusDBApache LicensePython, Node.js, JavaScriptYes

Related articles

This article is a child-friendly adaptation of the Wikipedia article on Document-oriented database, available under CC BY-SA 4.0.