Cloud & Software Development

NoSQL database

Also known as: NoSQL, non-relational database, NoSQL databases

A NoSQL database is a type of database that stores data in formats other than traditional rows and tables, such as JSON-like documents, key-value pairs, wide columns, or graphs.

Examples include MongoDB, Amazon DynamoDB, Redis, Cassandra, and Neo4j. NoSQL databases are popular for apps that need to scale massively or handle data with changing structures. While NoSQL offers flexibility and speed, traditional relational databases are often still the better choice for data with strict relationships, like financial records.

NoSQL database, explained at three levels

At home

A traditional database is like a spreadsheet with fixed columns. A NoSQL database is more like a filing cabinet of folders, where each folder can hold different kinds of papers.

At work

NoSQL databases help apps handle huge amounts of data or rapidly changing information at high speed.

Real-world examples

At home

Thomas built a recipe app where each recipe had different ingredients and steps. A document database stored each recipe naturally without forcing a fixed structure.

At work

Aisha leads data engineering at a Vancouver gaming company. They use a key-value NoSQL database to store millions of player sessions with very low delay.

How it compares

featureNoSQL databaseRelational database
StructureFlexibleFixed tables
Query languageVariesSQL
ScalingOften horizontalOften vertical
Best forLarge, varied, fast dataStructured, related data

NoSQL favours flexibility and scale. Relational favours structure and consistency.

For analysts

When teams propose NoSQL, I'd ask how the data will be queried and reported on. Reporting needs often favour relational databases.

History & origin

Carlo Strozzi used the name 'NoSQL' in 1998 for a lightweight database, but the modern meaning took hold in 2009 when Johan Oskarsson organized a meetup on non-relational databases. Google's Bigtable paper in 2006 and Amazon's Dynamo paper in 2007 inspired a wave of systems built for internet scale. Facebook created Cassandra in 2008, and MongoDB launched in 2009, becoming one of the most popular databases among developers. Over time, the lines blurred, as relational databases such as PostgreSQL added strong JSON support and some NoSQL databases added SQL-like query languages. In my view, NoSQL is best understood as 'not only SQL,' a set of tools for specific jobs.