A NoSQL (Not Only SQL) database provides a mechanism for the storage and retrieval of data that is modeled in a way other than the tabular relations used in relational databases. Instead of the typical tabular structure of a relational database, NoSQL databases house data within one data structure. Examples of NoSQL database models include key-value pair, document-oriented, column-oriented, graph-based, time-series, and object-oriented databases.
Why are NoSQL Databases Important?
Unlike traditional relational databases, NoSQL databases do not require a fixed schema, giving them the flexibility and scalability to handle large volumes of unstructured, semi-structured, and structured. These databases are well-suited for use cases where data requirements are not well-defined or where the data is constantly changing. NoSQL databases are often used in web applications, real-time big data processing, and other scenarios where flexibility, scalability, and performance are crucial.
NoSQL Database Uses
Below is a list of some different types of NoSQL databases and how they are used:
Key-Value Pair Databases
Data is stored as a key and value field per record. ZEN is an example of a key-value store database. Applications provide the database with a key that returns the corresponding data store value. The value portion of the record object can contain one or more attributes or fields, so it is not as rigidly defined as records in a relational database. Because the value port of the record has no specific data type, it has the flexibility to store a string of comma-delimited values. This simplicity of design makes key-value databases very compact, which is ideal for embedded and IoT applications. ZEN Core database has a footprint as small as 2MB.
Document-Oriented Databases
Document-oriented databases use character strings to store keys. The corresponding value is linked to objects such as JSON strings, XML documents, PDF files, images, or text documents. Documents in a document-oriented database can contain nested structures, arrays, and key-value pairs, providing a flexible and dynamic schema. Document-oriented databases are commonly used in applications such as content management systems, e-commerce platforms, and applications dealing with user-generated content.
Column-Oriented Databases
Traditional relational databases store each row of a table as a complete row. Column-oriented databases use a column store, so each logical record is stored as a unique key value and associated single field of a record. A record with three fields, including the primary key, will be stored as three distinct columns. Vector from Actian is an example of a database that uses a column store. The biggest reason to use a column-oriented database is performance. Consider a database record containing 100 fields; the application mainly needs the first and last columns. In this case, the row store database must scan or read the entire record to get to the last field. The column-oriented database only fetches the first and last fields of the query references. This requires far less hardware resources. However, the benefits go far beyond the initial read. Most databases cache the most frequently requested records in memory in anticipation of further similar requests. A traditional RDBMS would have to cache the whole row of the active record. Because the entire row is relatively large, it is less likely to take advantage of the CPU cache memory, which can operate 100 times faster than RAM. This ability to effectively exploit CPU cache memory is one of the key reasons column-oriented databases are chosen for performance.
Graph-Based Databases
Graph-based databases use a data model that consists of objects (Nodes) and relationships (Edges) to other objects. Metadata tags (properties) can track further similarities between objects and are often used to make decisions about storing similar objects together. Some graph databases store nodes, their edges (relationships), and properties (tags) as JSON documents. Graph databases exist primarily because they can quickly visualize or graph complex relationships that would be almost impossible to express as an SQL query. An example graph database might track recent movies and visualize the correlations by Genre, Actors, Studios, Producers, and other attributes. Similar movies would be clustered based on similarities and connected with the same relationships or associations.
Time-Series Databases
Time-series databases are a class of NoSQL databases designed to capture large volumes of activity that can be down-sampled and stored. Applications that track where deliveries are in a real-time logistics environment would be well suited to a time-series database. Every record is recorded, time-stamped and stored along with related attributes used for queries. With a time-series database, an application can be developed to tell the user exactly where a specific delivery was within a one-minute time window.
Object-Oriented Databases
An object-oriented database management system (OODBMS) is based on the principles of object-oriented programming. Data is created, modeled, and stored as objects, which are self-contained units that contain both data and the operations or methods that can be performed on that data. An OODBMS is most valuable for applications with complex data relationships that require persistence, support for diverse data types, and frequent schema changes.
Actian and NoSQL Databases
Actian offers a wide variety of NoSQL databases to meet your needs. Learn more about ZEN, a leading choice for embedded and IoT applications. Vector is a column-oriented database core component of the Actian Data Platform that runs on-premise and in the cloud. NoSQL is an OODBM that provides exceptional performance, scalability, availability and reliability.
Try the Actian Data Platform with a free cloud-based trial here.