DataStax Vector Now Available! Read more.

What is NoSQL?

NoSQL databases are designed to support cloud application requirements and overcome the scale, performance, data model and data distribution limitations of traditional relational databases (RDBMS’s).

What is NoSQL

NoSQL Explained

A NoSQL (Not-only-SQL) database stores, distributes and accesses data using methods that differ from relational databases (RDBMS’s). Internet leaders, such as Facebook, Google and Amazon, originally created and used the NoSQL technology because these tech-giants required massively scalable database management systems that could write and read data anywhere in the world, while delivering performance and availability to billions of users.

Today, most companies and organizations must also deliver large scale applications that personalize their customer’s experience. NoSQL is the database technology of choice for powering such systems.

How NoSQL Differs from Relational Databases

NoSQL and RDBMS databases support different application requirements and frequently co-exist in enterprises to support different use cases. The key technological decision criteria include the following:

Use an RDBMS when your concern is... Use NoSQL when your concern is...
Centralized, monolithic applications Decentralized (highly scalable), microservice applications
Moderate to high availability Continuous availability, zero-downtime
Moderate velocity data High-velocity data (devices, sensors, etc.)
Primarily structured data Structured, semi-structured, or unstructured
Complex/nested transactions and joins Simple transactions and queries
Scaling reads Scaling both writes and reads
Scaling up (aka “vertical scalability”) Scaling out (aka “horizontal scalability”)

How NoSQL Databases Differ From Each Other

There are a variety of different NoSQL databases on the market with the key differentiators between them being the following:

Data Model

We can classify NoSQL databases by the data model they support. Some support a wide-row tabular store, while others sport a model that is either document-oriented, key-value, or graph. More on this below.

Development APIs

NoSQL databases differ on their development API’s. Cassandra supports the Cassandra Query Language, an SQL-like language, and other APIs such as REST and GraphQL are under development.

Architecture

Some NoSQL databases like MongoDB use a primary replica / secondary replica architecture similar to relational databases. Cassandra and others are designed in a peer-to-peer fashion where all nodes in a database cluster are the same. The architecture of a NoSQL database greatly impacts how well the database supports requirements such as constant uptime, multi-geography data replication, and predictable performance.

Data Distribution Model

Because of their architecture differences, NoSQL databases differ in their support for reading, writing, and distributing data. NoSQL platforms like Cassandra support writes and reads on every node in a cluster and can replicate or synchronize data between many data centers and cloud providers.


It’s also worth noting that a set of databases known as “NewSQL” databases have emerged, adopting many of the distributed system architecture principles introduced by NoSQL databases while attempting to provide the full relational semantics of traditional RDBMS. These databases include Google Cloud Spanner and Cockroach DB and offer a different set of tradeoffs to Cassandra and other NoSQL databases.

Learn About Benchmarking NoSQL Databases

Types of NoSQL Datatabases

NoSQL databases support a variety of data models for storing and accessing data. The main categories of NoSQL data models are:

Key Value

Key/Value databases are some of the least complex as all of the data within consists of an indexed key and a value. Key-value databases use a hashing mechanism such that given a key, the database can quickly retrieve an associated value. Hashing mechanisms provide constant time access, which means they maintain high performance even at large scale. The keys can be any type of object, but are typically a string. The values are generally opaque blobs (i.e., a sequence of bytes that the database does not interpret). Examples include: Redis, Amazon DynamoDB, Riak, and Oracle NoSQL database. Some tabular NoSQL databases, like Cassandra, can also service key/value needs.

Document databases

Document databases expand on the basic idea of key-value stores where “documents” are more complex, in that they contain data and each document is assigned a unique key, which is used to retrieve the document. These are designed for storing, retrieving, and managing document-oriented information, often stored as JSON. Since the Document database can inspect the document contents, the database can perform some additional retrieval processing. Unlike RDBMSs which require a static schema, Document databases have a flexible schema as defined by the document contents. Examples include: MongoDB and CouchDB. Note that some RDBMS and NoSQL databases outside of pure document stores are able to store and query JSON documents, including Cassandra.

Tabular databases

Tabular databases organize data in rows and columns, but with a twist from the traditional RDBMS. Also known as wide-column stores or partitioned row stores, they provide the option to organize related rows in partitions that are stored together on the same replicas to allow fast queries. Unlike RDBMSs, the tabular format is not necessarily strict. For example, Apache Cassandra™ does not require all rows to contain values for all columns in the table. Like Key/Value and Document databases, Tabular databases use hashing to retrieve rows from the table. Examples include: Cassandra, HBase, and Google Bigtable.

Graph Databases

Graph databases store their data using a graph metaphor to exploit the relationships between data. Nodes in the graph represent data items, and edges represent the relationships between the data items. Graph databases are designed for highly complex and connected data, which outpaces the relationship and JOIN capabilities of an RDBMS. Graph databases are often exceptionally good at finding commonalities and anomalies among large data sets. Examples of Graph databases include DataStax Graph, Neo4J, JanusGraph, and Amazon Neptune.

Multi-model

Multi-model databases are an emerging trend in both the NoSQL and RDBMS markets. They are designed to support multiple data models against a single, integrated backend. Most database management systems are organized around a single data model that determines how data can be organized, stored, and manipulated. By contrast, a A multi-model database allows an enterprise to store parts of the system’s data in different data models, simplifying application development.


Benefits of NoSQL

NoSQL databases are primarily designed for supporting decentralized systems that target cloud applications. A NoSQL database like Cassandra typically offers the following benefits over other database management systems:

Continuously Available

Continuously Available

A database that stays online even in the face of the most devastating infrastructure outages.

Geographically Distributed

Geographically Distributed

Fully active data, everywhere you need it.

Low Latency

Operationally Low Latency

Response times fast enough for your most intense operational cloud applications.

Linearly Scalable

Linearly Scalable

Predictably scale out and scale in to meet the current and future data needs of cloud applications.

Functionally Cohesive

Functionally Cohesive

Coherent integration and interoperability of mixed workloads and multiple data models.

Operationally Mature

Operationally Mature

Enterprise-ready data management for cloud applications.

Low CTO

Low TCO

No requirements for specialized hardware or ancillary software.

How to Implement NoSQL

From a practical perspective, how do you go about actually moving to NoSQL and implementing your first application? In general, there are three ways to approach your adoption of a NoSQL database:

New Applications

New Applications

Many begin with NoSQL by applying it in new cloud applications and starting from the ground up. This approach avoids the pain of application rewrites and data migrations.

Augmentation

Augmentation

Some choose to augment an existing system by adding a NoSQL component to it. This often happens with applications that have outgrown an RDBMS due to scale problems or the need for better availability.

Full Rip-Replace

Full Rip-Replace

For systems that exhibit growing costs, or are breaking in major ways due to increased user concurrency, data velocity, or data volume, a full replacement is done with a NoSQL database.

How can I get started?

If you are looking to learn more about Apache Cassandra, we’ve got plenty of resources here to help you get started.

Try it out

DataStax for Developers

Learn how to succeed with Apache Cassandra™.

Visit Now
Astra

Try DataStax Astra

Rapidly build cloud-native applications with DataStax Astra, a database-as-a-service powered by Apache Cassandra.

Try For Free
Definitive Guide Cassandra

O’Reilly’s Cassandra: The Definitive Guide, 3rd Edition

Get your free digital copy to harness Cassandra’s speed and flexibility.

Get the Ebook