Topic 3 of 5
Once you know the shape of the data, you have to choose where to keep it: a relational database, a NoSQL database, or a file store. The exam asks you to tell the four types of non-relational database apart and match each need with the right Azure service.
Contents
A database is a central system in which data is stored and queried. In a broad sense, a file system is also a kind of database, but in a professional context the term means a dedicated system for managing data records, not files.
They're used to store and query structured data. Data is stored in tables that represent entities (customers, products, orders).
Primary key: Each instance of an entity is assigned a key that uniquely identifies it.
References: Those keys are used to reference the instance from other tables: an order stores its customer's key.
Normalization: Thanks to keys, duplicate values are eliminated: a customer's details are stored only once, not in every order.
SQL: Tables are managed and queried with Structured Query Language, based on an ANSI standard and similar across systems.
Domain D2 goes deeper into the relational model, SQL, and Azure relational services.
They're data management systems that don't apply a relational schema. They're often called NoSQL, even though some support a variant of the SQL language.
Key-value
Each record has a unique key and an associated value, which can be in any format.
Document
A form of key-value in which the value is a JSON document the system is optimized to parse and query.
Column family
Tabular data with rows and columns, but the columns are divided into groups (families) of logically related columns.
Graph
Entities as nodes, with links that define the relationships between them.
A trick to remember them
Key-value: I look up by key. Document: I query inside the JSON. Column family: wide tables with grouped columns. Graph: the relationships matter. In Azure, Azure Cosmos DB supports all four models through different APIs (D3).
| File store | Database | |
|---|---|---|
| Unit | Files (CSV, JSON, Parquet, images…) | Records managed by the system |
| Good for | Large volumes, binaries, data lakes | Frequent queries, updates, and transactions |
| Azure example | Blob Storage, Data Lake Storage Gen2, Azure Files | Azure SQL Database, Cosmos DB |
Azure offers many data services. You don't need to memorize them all: it's enough to know the types of tool and what they're for. Two delivery models come up often: PaaS (Microsoft manages the infrastructure: servers, patching, backups) and SaaS (the whole product is delivered ready to use).
Azure SQL
A relational family based on the SQL Server engine: Azure SQL Database (PaaS), SQL Managed Instance, and SQL Server on virtual machines.
Open-source databases
Azure Database for MySQL and Azure Database for PostgreSQL, managed services.
Azure Cosmos DB
A global-scale NoSQL database with several APIs: JSON documents, key-value, column families, and graphs.
Azure Storage
Blob containers for binaries, file shares, and key-value tables. With a hierarchical namespace it hosts data lakes.
Microsoft Fabric and OneLake
A SaaS analytics platform with a single shared store, OneLake. It includes lakehouse, warehouse, and databases (SQL database and Cosmos DB in Fabric).
Azure Data Explorer
A managed big data analytics platform for querying logs and telemetry that have a timestamp attribute.
| Need | Azure data store |
|---|---|
| Transactional data for a business app built on SQL Server | Azure SQL (Database, Managed Instance, or SQL Server on a VM) |
| A LAMP app or a team experienced with PostgreSQL | Azure Database for MySQL / PostgreSQL |
| JSON documents, key-value, column families, or graphs at global scale | Azure Cosmos DB |
| Binary files: images, video, backups | Azure Blob Storage |
| Network file shares in the cloud | Azure Files |
| Simple, fast key-value pairs | Azure Table Storage |
| A data lake with real folders for analytics | Azure Data Lake Storage Gen2 (or OneLake in Fabric) |
| Logs and telemetry with timestamps | Azure Data Explorer or Fabric Real-Time Intelligence |
Relational services are covered in D2 (Azure SQL Database and the open-source ones), and non-relational ones in D3 (Blob Storage, Files, Tables, and Cosmos DB).
| Situation | Answer | Why |
|---|---|---|
| Store a social network's friendships and traverse connections | Graph database | Nodes and relationships are first-class. |
| Store a user session with an identifier and a value | Key-value | Direct lookup by key. |
| A JSON product catalog with different attributes per category | Document database | JSON documents the system knows how to query. |
| Tabular data with logically grouped columns | Column family | Columns split into related groups. |
| Orders and customers linked by keys and queried with SQL | Relational database | Normalized tables and standard SQL. |
| Photos uploaded by an app's users | Azure Blob Storage | Cheap, scalable binary storage. |
| Analyze application logs by timestamp | Azure Data Explorer | Optimized for log and telemetry data. |
❓ Does "NoSQL" mean the database supports no SQL at all?
No. It means it doesn't apply a relational schema; some support a variant of SQL.
❓ Is a document database different from a key-value one?
It's a specific form of key-value in which the value is a JSON document the system can query.
❓ Which type of NoSQL stores entities as nodes with links between them?
A graph database.
❓ Does a column family store data without rows and columns?
No. It stores rows and columns, but groups the columns into related families.
❓ What are keys for in a relational database?
They uniquely identify each row and let other tables reference it, which avoids duplicating data.
❓ Which Azure service supports all four NoSQL models?
Azure Cosmos DB, through its different APIs.
Did you get this topic?
Test what you just learned
A recommendation app needs to quickly traverse who follows whom and which products their contacts have bought. Which type of database fits best?
Original questions, each with a full explanation.
Start a mock exam