Types of NoSQL databases

Data

NoSQL provides other opportunities to organize data in different ways. By offering a variety of data structures, NoSQL can be used for data analytics, big data management, social networking, and mobile application development.

A NoSQL database manages information using any of these basic data models:

Key-value store
This is generally considered the simplest form of NoSQL databases. This schema-less data model is organized into a dictionary of key-value pairs, where each element has a key and a value. The key can be like something similar in a SQL database, such as a shopping cart ID, and the value is an array of data, such as each individual item in that user’s shopping cart. It is typically used to cache and store user session information, such as shopping carts. However, it’s not ideal when you need to fetch multiple records at once. Redis and Memcached are examples of open source key-value databases.

Document store
As the name suggests, document databases store data as documents. They can be useful in managing semi-structured data, and the data is usually stored in JSON, XML, or BSON formats. This keeps the data together when it is used in applications, reducing the amount of translation required to use the data. Developers also gain more flexibility because data schemas do not have to match between documents (e.g., name vs. first name). However, this can be problematic for complex transactions, resulting in data corruption. Popular use cases for document databases include content management systems and user profiles. An example of a document-oriented database is MongoDB, a database component of the MEAN stack.

Wide column store
These databases store information in columns, which allows users to access only the specific columns they need without allocating additional memory for irrelevant data. This database tries to address the disadvantages of key-value and document stores, but because it can be a more complex system to manage, it is not recommended for new groups and projects. Apache HBase and Apache Cassandra are examples of open source wide column databases. Apache HBase is built on top of the Hadoop distributed file system, which provides a way to store sparse data sets that is commonly used in many big data applications. Apache Cassandra, on the other hand, is designed to manage large amounts of data across multiple servers and clustering that spans multiple data centers. It has been used for a variety of use cases, such as social media websites and real-time data analysis.

Graph store
This type of database usually contains data from a knowledge graph. Data elements are stored as nodes, edges, and properties. A node can be any object, place, or person. An edge defines a relationship between nodes. For example, a node can be a client, such as IBM, and an agency, such as Ogilvy. It would be preferable to categorize the relationship as a client relationship between IBM and Ogilvy.

Graph databases are used to store and manage a network of relationships between elements within a graph. Neo4j (link is outside of IBM), a Java-based graph database service with an open source community version where users can purchase licenses for online backup and high availability extensions or a pre-packaged licensed version with backup and extensions.

In-memory storage
With a database like IBM solidDB, data is stored in main memory rather than on disk, making data access faster than with conventional disk databases.