Skip to content
BENIBIX Learn

SQL vs NoSQL

A SQL database keeps data in linked tables with fixed rules. A NoSQL one uses other shapes, like documents or keys, and has looser rules.

Development🗃️ Databases

Relational Database

A database that keeps data in linked tables. You talk to it in SQL.

A relational database keeps data in tables that link to each other through keys. Each table holds one kind of thing, and keys tie a row in one table to rows in another. You ask it questions in SQL. It checks the rules you set, so the data stays correct. PostgreSQL, MySQL and SQLite are all relational databases.

Example
Jack's shop stores customers, orders and products in three tables. One SQL query joins them to show who bought what.
Why it matters
Most business data lives in relational databases. They have been the safe default for over 40 years.
Full entry
Development🗃️ Databases

NoSQL Database

A database that does not use linked tables. It keeps data in other shapes.

A NoSQL database stores data in some shape other than linked tables. Some store documents, some store keys and values, and some store graphs of linked points. Most do not need a fixed schema, so each record can look a bit different. Many are built to spread across lots of servers. MongoDB and Redis are two well-known examples.

Example
Jack's chat app saves each message as a document with its own fields. A NoSQL database lets new fields appear without changing a schema.
Why it matters
Some data fits tables badly. NoSQL databases give it a better shape, or more speed at huge scale.
Full entry

In one line

Relational Database
A database that keeps data in linked tables. You talk to it in SQL.
NoSQL Database
A database that does not use linked tables. It keeps data in other shapes.