What is a non-relational database?

A non-relational database organises data in a shape other than linked tables, chosen to fit a particular access pattern such as fetching a whole document or a single key very fast.

Why do non-relational databases exist?

Because some workloads fit tables poorly. A product catalogue where every category has different attributes, a session store that needs millions of tiny reads per second, a sensor feed appending billions of timestamped points, a social graph queried by following connections: each can be forced into relational tables, but a model designed for the shape is simpler and often much faster. Non-relational systems give up some general-purpose flexibility, usually joins and sometimes strict transactions, in exchange.

What are the main models?

ModelStoresOpen-source examplesGood at
DocumentJSON-like documents with nested fieldsMongoDB-compatible servers, CouchDBRecords with varying structure
Key-valueA value per keyRedis, Valkey, RocksDBCaches, sessions, counters
Wide-columnRows with many sparse columns, partitionedCassandra, ScyllaDB, HBaseHuge write volumes across nodes
GraphNodes and relationshipsNeo4j community edition, JanusGraphTraversing connections
Time seriesTimestamped measurementsInfluxDB, TimescaleDBMetrics, sensor data
SearchInverted indexes over textOpenSearch, Meilisearch, TypesenseFull-text and faceted search

How do they scale?

Many are built to spread data across several machines from the start. A wide-column store hashes each partition key to a node and keeps copies on two or three others, so adding servers adds both capacity and throughput. Document stores shard collections by a chosen key. Key-value caches often run as independent nodes with the client choosing which one holds each key. Relational systems can scale out too, but it is usually an add-on rather than the core design.

What is eventual consistency?

A guarantee that replicas converge on the same value if writes stop, without promising every read sees the latest write immediately. Distributed systems trade consistency, availability and latency against each other when the network misbehaves. Cassandra lets you choose per query: reading and writing at quorum (a majority of replicas) gives strong consistency for that key, while a level of one favours speed. Know which level your application uses before relying on a read reflecting a write just made.

# Cassandra: write and read at QUORUM for a strongly consistent key
cqlsh -e "CONSISTENCY QUORUM; INSERT INTO shop.carts (user_id, items) VALUES (42, ['sku-19']);"
# Redis or Valkey: check replica lag in bytes
redis-cli INFO replication | grep -E 'role|master_repl_offset|slave0'

Does non-relational mean no schema?

No, it means the schema lives in the application rather than in the database. Code still expects certain fields and types; when the database does not enforce them, every reader must handle old and new shapes. Most document stores now offer optional validation rules, and teams that use them avoid a common source of bugs. Plan document structure around the queries you need, since the database cannot efficiently join collections the way SQL joins tables.

When is a relational database still the better choice?

When data is highly connected and correctness across records matters, such as orders, payments, stock and accounts. SQL databases enforce constraints, run multi-row transactions and answer new questions with ad hoc joins. PostgreSQL also stores JSON with indexes, which covers many document-style needs in one system. A common design uses a relational database as the source of truth with a key-value cache and a search engine beside it. Our Relational or non-relational article goes through that decision.

What hardware do they need?

It depends on the model. In-memory key-value stores need RAM above all: a 40 GB data set belongs on a machine like ESSENTIAL-S with 64 GB DDR5. Wide-column clusters want several nodes with fast NVMe and many cores, such as three ESSENTIAL-L servers. Search engines want memory for their index caches. Our solution pages for Apache Cassandra clusters, Redis servers, OpenSearch clusters and InfluxDB servers give sizing for each.

Machines for non-relational databases

ModelProcessorCoresMemoryDrivesPortPer month
ESSENTIAL-SAMD Ryzen 7 9700X864 GB2x 512 GB SSD NVMe1 Gbps unmetered$46.20
ESSENTIAL-LAMD Ryzen 9 9950X16128 GB2x 960 GB SSD NVMe1 Gbps unmetered$106.20
ESSENTIAL-5AMD EPYC 741324128 GB2x 960 GB SSD NVMe1 Gbps unmetered$120.00
BUSINESS-3 2026AMD EPYC 4465P1264 GB2x 960 GB SSD NVMe3 Gbps unmetered$184.20

Related pages

Relational or non-relational

A practical comparison of SQL and non-relational databases by data shape, consistency, scaling, queries and operations, with patterns that combine both.

Read more

Apache Cassandra clusters

Run Apache Cassandra across data centres: Cassandra 5 features, snitch and replication per site, internode TLS over public ports, compaction and repairs.

Read more

Redis servers

Run Redis on your own hardware: persistence choices, fork memory headroom, Sentinel failover, cluster slots, the built-in data types of Redis 8 and sizing.

Read more

DBMS

What a database management system does beyond storing data: queries, transactions, concurrency, recovery, security, and the main families in use today.

Read more

Questions and answers

Is a non-relational database the same as NoSQL?

Yes, the two terms are used interchangeably for databases that do not organise data as related tables queried with SQL.

Are non-relational databases faster than SQL databases?

For the access pattern they are designed for, often yes. For ad hoc queries and joins across many records, relational databases are usually better.

Do non-relational databases support transactions?

Many do, with limits. Document and key-value stores commonly offer atomic operations on one record, and several now support multi-record transactions.

Can PostgreSQL replace a document database?

For many workloads, yes. Its JSONB type stores and indexes documents, though dedicated document stores scale out more naturally across many nodes.

Which non-relational database needs the most memory?

In-memory key-value stores such as Redis and Valkey, which keep the whole data set in RAM. Plan memory at least 1.5 times the data size.