There are various ways to classify NoSQL databases, with different categories and subcategories, some of which overlap. What follows is a non-exhaustive classification by data model, with examples:
Key–value store Key–value (KV) stores use the
associative array (also called a map or dictionary) as their fundamental data model. In this model, data is represented as a collection of key–value pairs, such that each possible key appears at most once in the collection.{{cite web The key–value model is one of the simplest non-trivial data models, and richer data models are often implemented as an extension of it. The key–value model can be extended to a discretely ordered model that maintains keys in
lexicographic order. This extension is computationally powerful, in that it can efficiently retrieve selective key
ranges.{{cite web Key–value stores can use
consistency models ranging from
eventual consistency to
serializability. Some databases support ordering of keys. There are various hardware implementations, and some users store data in memory (RAM), while others on
solid-state drives (SSD) or
rotating disks (aka hard disk drive (HDD)).
Document store The central concept of a document store is that of a "document". While the details of this definition differ among document-oriented databases, they all assume that documents encapsulate and encode data (or information) in some standard formats or encodings. Encodings in use include
XML,
YAML, and
JSON and
binary forms like
BSON. Documents are addressed in the database via a unique
key that represents that document. Another defining characteristic of a document-oriented database is an
API or query language to retrieve documents based on their contents. Different implementations offer different ways of organizing and/or grouping documents: • Collections • Tags • Non-visible
metadata • Directory hierarchies Compared to relational databases, collections could be considered analogous to tables and documents analogous to records. But they are different – every record in a table has the same sequence of fields, while documents in a collection may have fields that are completely different.
Graph Graph databases are designed for data whose relations are well represented as a
graph consisting of elements connected by a finite number of relations. Examples of data include
social relations, public transport links, road maps, network topologies, etc. ; Graph databases and their query language == Performance ==