The re­quire­ments of modern ap­plic­a­tion de­vel­op­ment have changed fun­da­ment­ally 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­vant­ages 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­tern­at­ive, 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­tern­at­ive database models. But this doesn’t ne­ces­sar­ily 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­plic­a­tion de­vel­op­ment. Other ap­proaches, such as object-oriented databases, never reached this level of pop­ular­ity due to their complex handling and im­ple­ment­a­tion. NoSQL databases were developed as a viable al­tern­at­ive to SQL in response to the lim­it­a­tions and problems of re­la­tion­al databases, which often cannot meet the re­quire­ments of modern ap­plic­a­tion de­vel­op­ment. NoSQL databases use in­nov­a­tions like cloud servers to offer an al­tern­at­ive 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 emphasise 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­tinu­ously updated in the ap­plic­a­tion. NoSQL solutions are also useful for pro­cessing 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 organise large amounts of data using flexible tech­niques such as documents, graphs, pairs of values, and columns. This makes NoSQL databases ideal for ap­plic­a­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­form­ance as the amount of data increases, NoSQL databases are a powerful, flexible and scalable solution even with large volumes of data.

Ho­ri­zont­al scaling is another special feature of NoSQL databases. Re­la­tion­al SQL databases are scaled ver­tic­ally 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­sib­il­it­ies of ap­plic­a­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­plic­a­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­plic­a­tions. Many different NoSQL databases are already in use around the world, most of which are open source and struc­tured dif­fer­ently depending on the provider and re­quire­ments. Although systems vary widely, the different ap­proaches to NoSQL fall into four main cat­egor­ies.

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­utes or tags that can be used to search the contents of the document. Document-oriented NoSQL databases are es­pe­cially 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­plic­a­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 organised using nodes and their con­nec­tions to each other. For data sets with highly in­ter­con­nec­ted in­form­a­tion, NoSQL graph databases offer much better per­form­ance than re­la­tion­al SQL databases. They are mainly used in social media ap­plic­a­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­vidu­al values are as­so­ci­ated with specific keys, with the data set itself acting as a key and rep­res­ent­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­form­ance. This NoSQL model is primarily used for data mining and analytics ap­plic­a­tions.

What are the ad­vant­ages of NoSQL over SQL?

Depending on the ap­plic­a­tion, NoSQL may offer certain ad­vant­ages 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­form­ance, 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­cessing 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­ni­fic­antly cheaper than in­stalling a single, high-per­form­ance server whose resources are regularly exhausted and then have to be replaced.

SQL database NoSQL database
Type One database for everything Various database models, such as document-oriented, graph, key-value, and column-oriented database
Data storage In­di­vidu­al data (for example, ‘Book title’) is stored in rows in a table and assigned to specific at­trib­utes (for example, ‘Author’, ‘Year of pub­lic­a­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­form­a­tion, the entire database must be cus­tom­ised (and taken offline). Flexible. New data sets can im­me­di­ately 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­form­ance when data volumes are high. Ho­ri­zont­al scaling: Each ad­min­is­trat­or can add new commodity and cloud servers, and the NoSQL database auto­mat­ic­ally 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­sist­ency, Isolation, Dur­ab­il­ity SQL databases have all ACID prop­er­ties. ACID trans­ac­tions are usually not supported in order to keep NoSQL databases flexible and ho­ri­zont­ally scalable. Instead, the BASE model is used (Basically Available, Soft State, Even­tu­ally Con­sist­ent). This model pri­or­it­ises avail­ab­il­ity over con­sist­ency.
Per­form­ance Uses indexes for large amounts of data. Queries, indexes, and structure must be optimised to improve the per­form­ance 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­plic­a­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 optimised for storing and pro­cessing large data sets.

CouchDB

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

Neo4j

Neo4j allows you to integrate data into a cloud-based NoSQL graph database. Most im­port­antly, it can graph­ic­ally represent re­la­tion­ships between in­di­vidu­al data sets and recognise patterns.

Redis

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

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­form­a­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­ation and analysis of your data.

Go to Main Menu