Semi-Structured and Unstructured Data Storage
AZ-305 AZ-305 · Design data storage solutions
Not all data fits in tables. Images, videos, logs, JSON documents, and analytical datasets need storage designed for their shape, scale, and access pattern. This guide covers the two pillars of Azure's non-relational storage — Blob Storage (including Data Lake Storage Gen2) and Cosmos DB — plus the redundancy and lifecycle options that control durability and cost.
Azure Blob Storage: tiers and access patterns
Azure Blob Storage stores unstructured data as objects. There are three blob types: block blobs (the default, for files, images, and data — up to ~190 TB per blob), append blobs (optimised for append operations such as logging), and page blobs (random read/write, used for VM disks). The access tiers control cost: Hot for frequently accessed data (highest storage cost, lowest access cost), Cool for infrequently accessed data stored at least 30 days, Cold for rarely accessed data stored at least 90 days, and Archive for data stored at least 180 days that can tolerate hours of retrieval latency. Choosing the tier is a cost exercise: archive storage is very cheap per GB, but rehydration and early-deletion charges punish data that is accessed sooner than the minimum period. Lifecycle management policies automate tier transitions and deletion — for example, move blobs to Cool after 30 days without access, to Archive after 180 days, and delete after seven years. The exam loves scenarios where data is written once and rarely read: the answer is almost always lifecycle policies moving data down the tiers.
Azure Data Lake Storage Gen2
Azure Data Lake Storage Gen2 is Blob Storage with a hierarchical namespace — directories and files instead of a flat container — plus Hadoop-compatible access and POSIX-like access control lists. It is the storage layer for analytics: data lakes feeding Synapse, Databricks, or Fabric. Use it when workloads need file-system semantics (directories, renames) at blob scale, or when big-data engines need high-throughput parallel access. The hierarchical namespace also enables fine-grained ACLs on directories and files, which matters when different teams must see different parts of the lake. For ordinary object storage without analytics requirements, plain Blob Storage is simpler and cheaper.
Azure Files and Azure NetApp Files
Azure Files provides SMB and NFS file shares in the cloud — the lift-and-shift answer for applications that need a shared file system, and the way to share files between on-premises and cloud. Premium Files (SSD-backed) delivers the low latency and high IOPS that performance-sensitive file workloads need. Azure NetApp Files is the enterprise-grade NFS/SMB service for demanding workloads (SAP, HPC, large databases) needing sub-millisecond latency and advanced data management. In exam scenarios, "shared files accessible from multiple VMs" points to Azure Files; "sub-millisecond NFS with snapshots and cloning" points to NetApp Files.
Cosmos DB: globally distributed NoSQL
Azure Cosmos DB is the globally distributed multi-model database: single-digit millisecond reads and writes, automatic scaling, and multi-region replication with five consistency levels. The APIs matter: NoSQL (Core/SQL) API is the native document API; MongoDB API for MongoDB-compatible workloads; Cassandra API for wide-column workloads; Gremlin API for graph data; Table API for key-value workloads compatible with Azure Table storage. The partition key is the most important design decision: it determines how data is distributed and how queries perform — choose a high-cardinality key that spreads writes evenly and matches the dominant query pattern, or you will create hot partitions. Request Units (RUs) measure throughput: provisioned throughput (manual or autoscale) suits predictable workloads; serverless suits intermittent workloads with low traffic. Consistency levels trade consistency for latency and availability: Strong (linearisability, highest latency), Bounded staleness, Session (the default — consistent within a session), Consistent prefix, and Eventual (lowest latency). For most applications, Session consistency is the right default; Strong is only needed when reads must never see stale data across regions.
Redundancy: durability vs cost vs availability
Storage redundancy options form a ladder: LRS (locally redundant — three copies in one datacentre, 11 nines durability, cheapest); ZRS (zone-redundant — copies across availability zones, survives datacentre failure); GRS (geo-redundant — LRS plus a copy in a paired region); GZRS (zone plus geo); and RA-GRS / RA-GZRS (read access to the secondary region). Choose by requirement: LRS for data that can be regenerated; ZRS for high availability within a region; GRS/GZRS for regional disaster recovery; RA variants when the application must read from the secondary during an outage. Note that changing redundancy is possible (for example, LRS to GRS) but converting between some options requires a support-assisted migration. Also note the exam distinction: redundancy protects against infrastructure failure, not against accidental deletion or corruption — that is what soft delete, versioning, and backups are for.
Protection: soft delete, versioning, and immutability
Soft delete for blobs retains deleted blobs for a configurable period so they can be recovered. Blob versioning keeps previous versions automatically when a blob is modified or deleted. Immutable storage (time-based retention or legal hold) prevents modification or deletion for a set period — required for regulatory records such as financial or legal documents. Combine these with private endpoints and Microsoft Entra authorisation (rather than storage account keys) for a complete secure design.
Securing storage access
Storage security design has three layers: authentication, authorisation, and network. For authentication, prefer Microsoft Entra ID authorisation (with RBAC data-plane roles) over storage account keys, which are effectively root credentials for the account; disable shared-key authorisation where possible. Shared access signatures (SAS) grant time-limited, permission-scoped access to specific resources — use user-delegation SAS (backed by Entra ID) rather than account-key SAS, and always set short expiry times. For authorisation, use RBAC data-plane roles (Storage Blob Data Reader/Contributor) scoped to the container or account. For network, use private endpoints and disable public access for sensitive data, and enable the storage firewall to restrict access to selected VNets or IP ranges. Microsoft Defender for Storage adds threat detection for suspicious access patterns, malware scanning on upload, and sensitive-data discovery. In exam scenarios, "applications must access storage without shared keys" points to Entra ID with managed identities, and "external users need temporary read access to one file" points to a user-delegation SAS with a short expiry.
Exam traps to watch for
- Choosing Archive tier for data that is accessed regularly — rehydration and early-deletion charges make it more expensive than Hot or Cool.
- Picking a low-cardinality Cosmos DB partition key (like country) — it creates hot partitions and throttling; choose a key that spreads writes and matches queries.
- Confusing redundancy with backup — GRS protects against regional failure, not against accidental deletion; soft delete and versioning handle that.
- Recommending plain Blob Storage when the workload needs directories, ACLs, and analytics engines — that is Data Lake Storage Gen2.
Practice questions
Test yourself on this guide. Answers are checked instantly, with a full explanation for each question.
Q1.A company stores 50 TB of security camera footage that is almost never viewed but must be kept for five years. Retrieval within a few hours is acceptable. What is the most cost-effective storage design?
Explanation: Archive tier is the cheapest storage for rarely accessed data with hours of acceptable retrieval latency, and a lifecycle policy automates the transition. Option A is wrong because Hot tier is the most expensive storage for data that is almost never read. Option C is wrong because Premium Files is high-performance file storage, far more expensive than Archive blobs. Option B is wrong because Cosmos DB is a database, not bulk object storage.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q2.A data science team needs to store petabytes of raw data for analytics with Synapse and Databricks, organised in directories with different access permissions per directory. Which storage service should the architect recommend?
Explanation: Data Lake Storage Gen2 provides a hierarchical namespace with directories and POSIX-like ACLs, plus Hadoop-compatible access for Synapse and Databricks — exactly the analytics lake requirement. Option B is wrong because flat Blob Storage has no directories or directory-level ACLs. Option A is wrong because Azure Files is SMB/NFS file sharing, not an analytics lake. Option D is wrong because Table storage is a key-value store for structured entities, not bulk analytics data.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q3.A global e-commerce application needs single-digit-millisecond reads and writes in five regions, with users always seeing their own writes. Which Cosmos DB consistency level should the architect recommend?
Explanation: Session consistency guarantees read-your-own-writes within a session — a user always sees their own updates — while allowing lower latency than Strong. Option A is wrong because Strong consistency adds cross-region latency on every write and is unnecessary when only session-level guarantees are needed. Option D is wrong because Eventual offers no ordering or read-your-own-writes guarantees. Option B is wrong because Consistent prefix guarantees ordering but not that a user sees their own latest write.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q4.A Cosmos DB container is experiencing throttling (429 errors) because most writes target a single partition. The partition key is the country code, and 80 percent of users are in one country. What should the architect recommend?
Explanation: The root cause is a low-cardinality partition key creating a hot partition; a high-cardinality key spreads writes evenly across physical partitions. Option A is wrong because more throughput does not fix uneven distribution — the hot partition still throttles. Option C is wrong because consistency level affects read guarantees, not partition distribution. Option B is wrong because multi-region writes address write availability across regions, not hot partitions.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q5.A company stores critical documents in Blob Storage. The documents must remain readable from a secondary region during a regional outage, and the storage must survive a datacentre failure in the primary region. Which redundancy option should the architect recommend?
Explanation: RA-GZRS combines zone redundancy in the primary region (survives datacentre failure) with geo-replication to a paired region plus read access to the secondary — matching both requirements. Option D is wrong because LRS keeps copies only in one datacentre. Option A is wrong because ZRS has no geo-replication for regional outages. Option C is wrong because GRS provides no read access to the secondary during an outage and no zone redundancy in the primary region.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q6.A financial firm must retain transaction records for seven years and prove that no record was modified or deleted during that period. Which Blob Storage feature should the architect recommend?
Explanation: Immutable storage with time-based retention locks blobs against modification or deletion for the retention period, providing the tamper-proof guarantee regulators require. Option D is wrong because versioning keeps old versions but does not prevent deletion of the blob itself. Option B is wrong because soft delete only allows recovery after deletion; it does not prevent modification. Option A is wrong because geo-redundancy protects against regional failure, not tampering.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q7.An application writes millions of small JSON documents per day with unpredictable schema, and needs to query them by multiple attributes with millisecond latency. Which storage service should the architect recommend?
Explanation: Cosmos DB for NoSQL stores JSON documents natively, indexes all properties by default for flexible attribute queries, and delivers single-digit-millisecond latency at massive scale. Option D is wrong because Blob Storage is object storage with no query engine for document attributes. Option A is wrong because Azure Files is file sharing, not a document database. Option B is wrong because Table storage supports only PartitionKey/RowKey queries efficiently and lacks the indexing and latency of Cosmos DB.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q8.A media company uploads video files that are transcoded once and then streamed frequently for a month, after which viewing drops sharply. What storage design minimises cost while keeping the videos available?
Explanation: Hot tier serves the heavy first-month streaming cheaply on access cost, and the lifecycle policy automatically moves videos to the cheaper Cool tier once viewing drops — the cost-optimal pattern for this access profile. Option B is wrong because keeping rarely viewed videos in Hot tier wastes storage spend. Option A is wrong because Archive tier has hours of retrieval latency and early-deletion charges, making it unsuitable for videos streamed in their first month. Option D is wrong because Premium Files is expensive high-performance file storage, not object storage for media.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data
Q9.A legacy application running on VMs in two regions needs a shared file system with sub-millisecond latency, snapshots, and cloning for its database files. Which service should the architect recommend?
Explanation: Azure NetApp Files is the enterprise NFS/SMB service delivering sub-millisecond latency with snapshots, cloning, and data management features for demanding workloads. Option B is wrong because Standard Files cannot deliver sub-millisecond latency or NetApp's data management features. Option C is wrong because Blob Storage is object storage, not a shared file system. Option D is wrong because Data Lake Storage is an analytics lake, not a low-latency shared file system for database files.
Exam objective: AZ-305 Domain 2: Design data storage solutions for semi-structured and unstructured data