WeCodeAcademy

Beyond Tables: NoSQL Databases

Relational databases are not the only kind. NoSQL databases drop the fixed table layout, usually to scale across many servers or to fit awkward data. The main families:

TypeStoresExample useExamples
Key-valueA value found by its keySessions, cachesRedis
DocumentFlexible JSON-like documentsProduct catalogues, contentMongoDB
Column familyWide rows grouped by columnHuge event logsCassandra
GraphNodes and links between themSocial networks, recommendationsNeo4j

NoSQL is a tool, not an upgrade. Relational databases remain the best fit when data is structured, relationships matter and consistency is vital.

Examplepython
Open in editor »
Quick check

Which type of database stores things by key, like a dictionary?

Your turn: write the code

From the list of documents, print the names of the products that have a 'tags' field, as a list.

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.