Nowadays, there is a wide choice of NoSQL databases, which differ in structure and principles of storing information. Based on these characteristics, one can identify four major NoSQL database types: column-oriented database, key-value store, document store, and graph database. Each type has strong and weak points and is suitable for specific tasks. Some of the NoSQL databases are a combination of some of the presented four types.
Column-oriented databases store each column with a specific property of the entities in separate tables. They are connected via an index assigned to each entity. Another NoSQL database type suitable for storing a list of entities with related properties is document stores. However, unlike column-oriented databases, document stores do not have separate tables for different data types. All the information related to the document is stored as a single entity in them. The major difference between them is that column-oriented databases are focused on normalization, meaning they do not store the same data unit twice. Documents stores may have repeated information instead of the use of foreign keys.
These databases store information very accurately, but they lack flexibility. Contrastingly, key-value stores are very easy to extend due to their simple structure. It is based on pairs of interconnected elements: a key (for instance, ‘Name’) and a value (‘John’). The value can be anything from a number to an object comprising another set of key-value pairs. Thus, key-value stores’ structure is similar to that of document stores’, but it is much simpler.
Graph databases are the most complex among the described NoSQL databases in terms of structure. Its major difference from other NoSQL types is its focus on relationships between different data elements. Graph databases have two main components: nodes that stand for certain entities and edges that demonstrate relationships between two entities. Edges may have their own properties, such as a direction to show a superiority-inferiority relationship between two entities. Graph databases are the best choice if one works with highly interconnected data.