FC0-U71 ยท Data and databases
Non-relational databases: key-value, document and more
Key-value, document and other non-relational stores, and when they fit better than relational ones.
Key points
- Non-relational (NoSQL) databases do not store data in fixed tables linked by keys.
- Key-value stores map a unique key to a value.
- Document stores keep JSON-like documents whose fields can differ.
- Graph and column stores serve other shapes of data.
- They fit flexible structures and large-scale distribution; relational databases fit structured data with strong relationships.
Source: https://www.mongodb.com/docs/manual/core/data-modeling-introduction/
Practice questions
Which type of database stores each item as a unique key paired with a value?
- Key-value store
- Spreadsheet table
- Relational join table
- Backup catalog
Show answer
Answer: A. Key-value store
A key-value store looks up a value directly by its key. The other options are not database models of that kind.
In which situations does a non-relational database tend to fit well?
- The structure of the data changes often
- Data must be spread across many servers for scale
- Every report needs complex joins across many fixed tables
- The data is naturally a strict grid of rows and columns
- Strict relationships between records must be enforced everywhere
Show answer
Answer: A. The structure of the data changes often, B. Data must be spread across many servers for scale
Flexible structure and horizontal scale are classic strengths of non-relational stores. Heavy joins, rigid grids and enforced relationships point to a relational database.
Non-relational databases cannot represent related data at all.
Show answer
Answer: False
They can relate data, for example by embedding related items inside a document or storing references. They just do not rely on fixed tables and foreign-key constraints.
Practice 8 questions on this topic in Bitzu
Short lessons, instant explanations and spaced review of what you get wrong. Free on iOS and Android.
