The re­quire­ments of modern ap­pli­ca­tion de­vel­op­ment have changed fun­da­men­tal­ly over the past 15 years. Ever-in­creas­ing volumes of data need to be stored, processed and updated more and more quickly. When it comes to managing large amounts of data, non-re­la­tion­al databases, also known as NoSQL databases, have been a popular choice for some time. But what is NoSQL exactly? And what are the ad­van­tages of this modern approach to data storage?

What is NoSQL?

NoSQL stands for “not only SQL,” a name that sums up the database model in a nutshell. Rather than being a separate al­ter­na­tive, it’s an en­hance­ment and useful addition to tra­di­tion­al re­la­tion­al SQL databases. NoSQL databases overcome the limits of re­la­tion­al systems by using al­ter­na­tive database models. But this doesn’t nec­es­sar­i­ly mean that NoSQL databases don’t use any SQL systems. There are also many hybrid variants that use both solutions and still fall under the umbrella of NoSQL.

Until the late 2000s, SQL databases were the ultimate in ap­pli­ca­tion de­vel­op­ment. Other ap­proach­es, such as object-oriented databases, never reached this level of pop­u­lar­i­ty due to their complex handling and im­ple­men­ta­tion. NoSQL databases were developed as a viable al­ter­na­tive to SQL in response to the lim­i­ta­tions and problems of re­la­tion­al databases, which often cannot meet the re­quire­ments of modern ap­pli­ca­tion de­vel­op­ment. NoSQL databases use in­no­va­tions like cloud servers to offer an al­ter­na­tive data model in which many different types of data can be stored and processed. The resulting data struc­tures are powerful and flexible and can react quickly to changing re­quire­ments.

NoSQL databases are often called struc­tured data stores to emphasize the key dif­fer­ence between NoSQL and re­la­tion­al SQL databases. NoSQL databases don’t use rigid tabular schemas where data must be defined before storage. They use more flexible methods that make it easy to add new data sets, which are con­tin­u­ous­ly updated in the ap­pli­ca­tion. NoSQL solutions are also useful for pro­cess­ing un­struc­tured or unknown data, which is not possible with a re­la­tion­al database.

How do NoSQL databases work?

Unlike re­la­tion­al SQL-based databases, NoSQL databases don’t use con­ven­tion­al tables with rows and columns to store data. Instead, they organize large amounts of data using flexible tech­niques such as documents, graphs, pairs of values, and columns. This makes NoSQL databases ideal for ap­pli­ca­tions that must process a high volume of data and therefore require flexible struc­tures. NoSQL databases use hardware clusters and cloud servers, so capacity is evenly dis­trib­uted, and the database runs smoothly even when data volumes are high. In contrast to re­la­tion­al databases, which rapidly lose per­for­mance as the amount of data increases, NoSQL databases are a powerful, flexible and scalable solution even with large volumes of data.

Hor­i­zon­tal scaling is another special feature of NoSQL databases. Re­la­tion­al SQL databases are scaled ver­ti­cal­ly and run on a single server. To increase their capacity, you would have to invest in a more powerful server. This is expensive in the long term and limits the pos­si­bil­i­ties of ap­pli­ca­tion de­vel­op­ment. NoSQL solutions usually dis­trib­ute data across multiple servers. If the amount of data increases, new servers are simply added. This allows NoSQL databases to easily store and process large amounts of data, making them ideal for big data ap­pli­ca­tions.

What are the four most important types of NoSQL databases?

Unlike re­la­tion­al databases, struc­tured data stores do not use fixed schemas and are therefore perfect for big data ap­pli­ca­tions. Many different NoSQL databases are already in use around the world, most of which are open source and struc­tured dif­fer­ent­ly depending on the provider and re­quire­ments. Although systems vary widely, the different ap­proach­es to NoSQL fall into four main cat­e­gories.

Document-oriented databases

In document-oriented NoSQL databases, data is stored directly in documents of varying length. The data doesn’t have to be struc­tured. The data is assigned various at­trib­ut­es or tags that can be used to search the contents of the document. Document-oriented NoSQL databases are es­pe­cial­ly useful for content man­age­ment systems and blogs. The most commonly used data format is JSON (JavaScript Object Notation), which allows for fast exchange of data between ap­pli­ca­tions.

Graph databases

A graph database employs nodes and edges to represent re­la­tion­ships between data. The network of re­la­tion­ships between the data is organized using nodes and their con­nec­tions to each other. For data sets with highly in­ter­con­nect­ed in­for­ma­tion, NoSQL graph databases offer much better per­for­mance than re­la­tion­al SQL databases. They are mainly used in social media ap­pli­ca­tions, for example to represent the re­la­tion­ships between followers on Twitter or Instagram.

Key-value databases

Whereas SQL databases use rigid schemas and tables, key-value databases store data in the form of key value pairs. In­di­vid­ual values are as­so­ci­at­ed with specific keys, with the data set itself acting as a key and rep­re­sent­ing a value. The key also forms an index that can be used to search the database. The keys of NoSQL key-value databases are always unique and are similar to the primary keys of re­la­tion­al databases.

Column-oriented databases

Unlike re­la­tion­al database models, column-oriented databases store data in columns instead of rows. This results in faster data reading processes and higher per­for­mance. This NoSQL model is primarily used for data mining and analytics ap­pli­ca­tions.

What are the ad­van­tages of NoSQL over SQL?

Depending on the ap­pli­ca­tion, NoSQL may offer certain ad­van­tages over tra­di­tion­al re­la­tion­al databases. Whereas SQL systems can quickly be stretched to capacity (for example, when handling big data), NoSQL databases feature high-per­for­mance, scalable models that can read and process large amounts of data at top speed.

NoSQL databases avoid the rigid schemas of SQL systems and use more flexible models that are ideal for pro­cess­ing high volumes of data. Since NoSQL databases store data on dis­trib­uted hardware clusters, they’re less prone to dis­rup­tions. They’re also sig­nif­i­cant­ly cheaper than in­stalling a single, high-per­for­mance server whose resources are regularly exhausted and then have to be replaced.

SQL database NoSQL database
Type One database for every­thing Various database models, such as document-oriented, graph, key-value, and column-oriented database
Data storage In­di­vid­ual data (for example, “Book title”) is stored in rows in a table and assigned to specific at­trib­ut­es (for example, “Author,” “Year of pub­li­ca­tion,” and so on). The data sets are stored in separate tables and merged by the system during complex searches. Instead of tables, NoSQL databases use either documents, key values, graphs or columns.
Schemas Data type and structure are defined in advance. To store new in­for­ma­tion, the entire database must be cus­tomized (and taken offline). Flexible. New data sets can im­me­di­ate­ly be added. Struc­tured, semi-struc­tured, and un­struc­tured data can be stored together; no prior con­ver­sion is necessary.
Scaling Vertical scaling: A single server must support the entire database system, causing a drop in per­for­mance when data volumes are high. Hor­i­zon­tal scaling: Each ad­min­is­tra­tor can add new commodity and cloud servers, and the NoSQL database au­to­mat­i­cal­ly sends the data to all servers.
De­vel­op­ment model Open-source software (such as MySQL) and paid software (Oracle database) Open-source software and paid software
ACID prop­er­ties: Atomicity, Con­sis­ten­cy, Isolation, Dura­bil­i­ty SQL databases have all ACID prop­er­ties. ACID trans­ac­tions are usually not supported in order to keep NoSQL databases flexible and hor­i­zon­tal­ly scalable. Instead, the BASE model is used (Basically Available, Soft State, Even­tu­al­ly Con­sis­tent). This model pri­or­i­tizes avail­abil­i­ty over con­sis­ten­cy.
Per­for­mance Uses indexes for large amounts of data. Queries, indexes, and structure must be optimized to improve the per­for­mance of SQL systems. NoSQL databases are much more powerful because they use cloud servers and hardware clusters.
APIs Queries for storing and re­triev­ing data are submitted using Struc­tured Query Language (SQL) Data is stored and queried via object-based APIs.

Most NoSQL databases use open-source software that any internet user can download. This makes it much easier to get started with them. You can download a range of free NoSQL ap­pli­ca­tions, learn how they work, and initially use them to augment your existing SQL database. The following NoSQL databases are well es­tab­lished:

Cassandra

Cassandra is a column-oriented NoSQL database optimized for storing and pro­cess­ing large data sets.

CouchDB

The document-oriented database CouchDB uses an intuitive HTTP/JSON API and can be im­ple­ment­ed for any area of ap­pli­ca­tion, from big data to mobile and web.

Neo4j

Neo4j allows you to integrate data into a cloud-based NoSQL graph database. Most im­por­tant­ly, it can graph­i­cal­ly represent re­la­tion­ships between in­di­vid­ual data sets and recognize patterns.

Redis

The key-value database Redis is an in-memory database. It stores data directly in the cache to boost per­for­mance.

MongoDB

MongoDB has been one of the most popular NoSQL databases for years. The database, written in the C++ pro­gram­ming language, works in a document-oriented manner and stores in­for­ma­tion in BSON format (Binary JSON).

Tip

With Managed MongoDB from IONOS, you can rely on a NoSQL database that grows with your workload. Scale your needs flexibly and con­cen­trate entirely on the eval­u­a­tion and analysis of your data.

Go to Main Menu