NoSQL Databases

Learn about NoSQL databases, their types, and when to use them.

Relational databases are not the only kind of databases in the world. There’s also an extensive and diverse group of non-relational databases called NoSQL.

What are NoSQL databases?

NoSQL database is an interesting term because it says what it’s not instead of what it is. NoSQL includes all the databases that don’t fit the relational schema definition.

This category is so big that if we pick two NoSQL databases randomly, they’ll probably have nothing in common. That’s why discussing NoSQL databases by themselves doesn’t make much sense. It’s helpful though to discuss specific types of NoSQL databases.

Types of NoSQL databases

We usually categorize NoSQL stores by the data structures they support. There’s no perfect categorization, and some specific databases might fall into multiple categories. Here are some commonly used NoSQL database types.

Key-value stores

As the name suggests, the record in the key-value database consists of the key and the value. Such databases don’t provide fancy search options. We can either select all records or search specific records by key. Instead, such databases have outstanding performance, making them great for storing some relatively small, frequently-used data.

Key-value databases are good for storing user sessions, configuration parameters, and other data accessed by key only.

Notable example: Redis

Redis is an open-source, in-memory key-value store with built-in persistence, replication, and transactions. Redis also supports lists, sets, and key-value maps as value types, making it possible to store more complex data.

There is a PHP extension for ...