Brains4Cloud
ESEN
Practice

Topic 3 of 5

D1 · Core data concepts

Databases and data stores in Azure

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.

What is a database?

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.

Relational databases

They're used to store and query structured data. Data is stored in tables that represent entities (customers, products, orders).

1

Primary key: Each instance of an entity is assigned a key that uniquely identifies it.

2

References: Those keys are used to reference the instance from other tables: an order stores its customer's key.

3

Normalization: Thanks to keys, duplicate values are eliminated: a customer's details are stored only once, not in every order.

4

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.

Non-relational databases

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.

The four types of NoSQL

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, supports all four models through different APIs (D3).

Files vs. databases

File storeDatabase
UnitFiles (CSV, JSON, Parquet, images…)Records managed by the system
Good forLarge volumes, binaries, data lakesFrequent queries, updates, and transactions
Azure exampleBlob Storage, Data Lake Storage Gen2, Azure FilesAzure SQL Database, Cosmos DB

Azure data stores

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.

Which service for each case

NeedAzure data store
Transactional data for a business app built on SQL ServerAzure SQL (Database, Managed Instance, or SQL Server on a VM)
A LAMP app or a team experienced with PostgreSQLAzure Database for MySQL / PostgreSQL
JSON documents, key-value, column families, or graphs at global scaleAzure Cosmos DB
Binary files: images, video, backupsAzure Blob Storage
Network file shares in the cloudAzure Files
Simple, fast key-value pairsAzure Table Storage
A data lake with real folders for analyticsAzure Data Lake Storage Gen2 (or OneLake in Fabric)
Logs and telemetry with timestampsAzure Data Explorer or Fabric Real-Time Intelligence

Relational services are covered in D2 ( and the open-source ones), and non-relational ones in D3 (, Files, Tables, and Cosmos DB).

Exam scenarios

SituationAnswerWhy
Store a social network's friendships and traverse connectionsGraph databaseNodes and relationships are first-class.
Store a user session with an identifier and a valueKey-valueDirect lookup by key.
A JSON product catalog with different attributes per categoryDocument databaseJSON documents the system knows how to query.
Tabular data with logically grouped columnsColumn familyColumns split into related groups.
Orders and customers linked by keys and queried with SQLRelational databaseNormalized tables and standard SQL.
Photos uploaded by an app's usersAzure Blob StorageCheap, scalable binary storage.
Analyze application logs by timestampAzure Data ExplorerOptimized for log and telemetry data.

Common exam traps

❓ 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?

Ready to test "Databases and data stores in Azure"?

Original questions, each with a full explanation.

Start a mock exam