All exams← All Azure Data Fundamentals (DP-900) notes

Non-relational data on Azure: Azure Data Fundamentals (DP-900) revision notes

Revision notes

What is non-relational data?

Non-relational (NoSQL) data does not fit neatly into rows and tables with a fixed schema. It covers key/value pairs, documents, graphs, columnar stores, and object/blob storage. Azure's main non-relational services are Azure Cosmos DB and Azure Storage (Blob, Table, File, Queue).

Azure Cosmos DB

Cosmos DB is Microsoft's globally distributed, multi-model NoSQL database. It supports several APIs so you can pick the data model that suits your app:

  • NoSQL (Core) API - native document model, stores JSON
  • MongoDB API - document model, compatible with MongoDB drivers
  • Cassandra API - wide-column model
  • Gremlin API - graph model (nodes and edges)
  • Table API - key/value, upgrade path from Azure Table Storage

Cosmos DB guarantees single-digit millisecond latency at the 99th percentile, offers 99.999% read/write availability with multi-region writes, and gives you five tunable consistency levels: Strong, Bounded Staleness, Session (the default), Consistent Prefix, and Eventual - trading consistency for lower latency and higher throughput as you move down the list. Throughput is measured in Request Units (RU/s), which can be provisioned manually or set to autoscale, or you can use serverless mode for spiky/unpredictable workloads.

Azure Storage

Azure Storage is the go-to for unstructured and semi-structured data:

  • Blob Storage - unstructured objects (images, video, backups, logs). Three access tiers: Hot (frequent access), Cool (infrequent, min 30-day storage), and Archive (rare access, min 180-day storage, hours to rehydrate)
  • Table Storage - simple NoSQL key/value store using PartitionKey and RowKey, cheap and schema-less
  • File Storage (Azure Files) - fully managed file shares accessible via SMB/NFS, good for lift-and-shift
  • Queue Storage - simple messaging between application components, decoupling producers and consumers

Common exam mistakes

  • Don't confuse Table Storage (Azure Storage) with Cosmos DB's Table API - the latter has better throughput/global distribution guarantees.
  • Blob storage tiers are about access frequency and cost, not about structure - blobs are always unstructured.
  • Cosmos DB is multi-model but each container uses ONE API - you choose it at container creation and cannot mix APIs freely.
  • Remember RU/s is the Cosmos DB currency for throughput, not raw CPU or storage size.
  • Session consistency (not Strong) is the DEFAULT consistency level in Cosmos DB.

Key facts

Flashcards

What is the default consistency level in Azure Cosmos DB?
Session consistency.
tap to reveal
Name the five Cosmos DB consistency levels in order from strongest to weakest.
Strong, Bounded Staleness, Session, Consistent Prefix, Eventual.
tap to reveal
What unit measures throughput in Cosmos DB?
Request Units per second (RU/s).
tap to reveal
Which Cosmos DB API would you use to model relationships like a social network?
The Gremlin API (graph model of nodes and edges).
tap to reveal
Which Cosmos DB API is compatible with existing MongoDB drivers?
The Azure Cosmos DB API for MongoDB.
tap to reveal
What is the minimum storage duration before you incur early-deletion charges in the Cool tier?
30 days.
tap to reveal
What is the minimum storage duration for the Archive tier, and how long does rehydration take?
180 days minimum; rehydration can take several hours.
tap to reveal
What two keys form the schema of Azure Table Storage?
PartitionKey and RowKey.
tap to reveal
Which Azure Storage service provides SMB/NFS managed file shares?
Azure Files.
tap to reveal
Which Azure Storage service is used to decouple application components with asynchronous messaging?
Queue Storage.
tap to reveal
What availability SLA does Cosmos DB guarantee with multi-region writes?
99.999% read/write availability.
tap to reveal
Can you use more than one API on a single Cosmos DB container?
No - each container is bound to one API chosen at creation.
tap to reveal
What latency target does Cosmos DB promise at the 99th percentile?
Single-digit millisecond latency for reads and writes.
tap to reveal
Which Cosmos DB throughput mode suits unpredictable, spiky workloads?
Serverless mode (pay per request, no provisioned RU/s).
tap to reveal
What kind of data does Blob Storage store?
Unstructured data such as images, video, backups, and log files.
tap to reveal
Practice questions

Non-relational data on Azure: 5 practice questions

Q1. Which Azure Cosmos DB API is the native API and stores data as JSON documents that can be queried using SQL-like syntax?
  • A.  Core (SQL) API
  • B.  Gremlin API
  • C.  Table API
  • D.  Cassandra API
Show answer & explanation
✓ Answer: A. Core (SQL) API
The Core (SQL) API is Cosmos DB's native API, storing items as JSON documents and querying them with a SQL-like syntax. Table API is for key-value data compatible with Azure Table storage, Cassandra API is for wide-column workloads, and Gremlin API is for graph data.
Q2. A team needs to store data as nodes and edges so they can efficiently query relationships such as 'friends of friends'. Which type of non-relational database best fits this need?
  • A.  Key-value store
  • B.  Column-family store
  • C.  Graph database
  • D.  Document database
Show answer & explanation
✓ Answer: C. Graph database
Graph databases store entities as nodes and relationships as edges, making relationship traversal queries (like friend-of-friend) fast and natural. Document and key-value stores don't model relationships directly, and column-family stores are optimized for wide rows of related columns, not traversal.
Q3. Azure Table storage organizes entities using which two properties to identify and partition data?
  • A.  PartitionKey and RowKey
  • B.  ClusterKey and ShardKey
  • C.  IndexKey and SortKey
  • D.  PrimaryKey and ForeignKey
Show answer & explanation
✓ Answer: A. PartitionKey and RowKey
Azure Table storage uses PartitionKey to group related entities for scalability and RowKey to uniquely identify an entity within a partition. There is no ForeignKey concept because Table storage is a schemaless NoSQL key-value store, not a relational database.
Q4. Which Azure storage service is purpose-built for storing large amounts of unstructured binary data such as images, videos, and backups?
  • A.  Azure Queue storage
  • B.  Azure Table storage
  • C.  Azure Blob storage
  • D.  Azure SQL Database
Show answer & explanation
✓ Answer: C. Azure Blob storage
Azure Blob storage is optimized for storing massive amounts of unstructured data like images, video, and documents as objects (blobs). Table storage holds structured NoSQL key-value data, Queue storage holds messages for decoupling components, and SQL Database is relational.
Q5. A company rarely accesses certain compliance backups and can tolerate several hours of retrieval latency in exchange for the lowest possible storage cost. Which Blob storage access tier should they choose?
  • A.  Hot
  • B.  Cold
  • C.  Cool
  • D.  Archive
Show answer & explanation
✓ Answer: D. Archive
The Archive tier offers the lowest storage cost but data is stored offline and must be rehydrated before it can be read, which can take hours. Hot, Cool, and Cold tiers all keep data online with immediate access, at progressively lower cost but higher access charges as you move from Hot to Cold.
Test yourself
See the Azure Data Fundamentals (DP-900) page

More Azure Data Fundamentals (DP-900) topics