NoSQL
Databases that store data in shapes other than tables with fixed columns.
NoSQL is an umbrella name for databases that do not use the classic relational model of tables, rows and fixed columns queried with SQL. The name is usually read as "not only SQL". They became popular in the late 2000s, when big web companies needed to store huge amounts of data spread over many servers, with flexible shapes and very fast reads and writes.
There are four main families. Document databases, like MongoDB, store each record as a JSON-like document that can have its own fields. Key-value stores, like Redis or Amazon DynamoDB, work like a giant dictionary: give a key, get the value back, extremely fast. Wide-column databases, like Cassandra, store huge tables where each row can have different columns. Graph databases, like Neo4j, store things and the connections between them, ideal for social networks or fraud detection.
The trade-off is that you design around how the data will be read. A relational database lets you ask almost any question later by joining tables; many NoSQL databases are fast and scale out easily precisely because they limit joins and sometimes accept that different copies may be briefly out of sync. Neither is better in general. Many companies use both: a relational database for orders and payments, and a NoSQL one for sessions, caches, catalogs or activity feeds.
Keep in mind
- "Not only SQL": databases without the fixed-table model.
- Four families: document, key-value, wide-column and graph.
- Usually scale across many servers easily, often with fewer joins and looser consistency.
- Often used alongside a relational database, not instead of it.