Designing for semi-structured and unstructured data

AZ-305 Azure Solutions ArchitectData storageAbout 25 minutesBy Cloud Hands On

Pick Cosmos DB, Table storage, Blob storage, Data Lake or Azure Files, then balance features, performance, cost and durability.

In this lesson you'll learn

1. Semi-structured data

Refresher: what "semi-structured" means

Semi-structured data, such as JSON documents or key-value pairs, has some structure but no fixed schema. Each record can have different fields. It's common in web, mobile and IoT apps.

RequirementRecommend
Global app, single-digit millisecond reads, multi-region writesAzure Cosmos DB for NoSQL
Existing MongoDB or Cassandra app, minimal code changeCosmos DB for MongoDB or for Apache Cassandra
Graph relationships, such as a social networkCosmos DB for Apache Gremlin
Simple key-value data at the lowest costAzure Table storage (or Cosmos DB for Table for global distribution)

Consistency levels

From strongest to weakest: Strong, Bounded staleness, Session (the default: a user always sees their own writes), Consistent prefix and Eventual. Stronger consistency means higher latency and lower availability for writes across regions.

Capacity modes

Provisioned throughput (with optional autoscale) for steady or predictable traffic, and serverless for light, spiky or dev workloads, billed per request unit used.

2. Unstructured data

RequirementRecommend
Images, video, backups and documents accessed over HTTPBlob storage
Big-data analytics with folders and POSIX permissionsData Lake Storage (hierarchical namespace)
SMB or NFS file shares for lift-and-shift appsAzure Files
Very high-performance NFS/SMB for enterprise apps such as SAP or HPCAzure NetApp Files

3. Balancing features, performance and cost

  • Access tiers: hot, cool, cold and archive, moved automatically by lifecycle management rules.
  • Performance: premium block blob accounts for low-latency, high-transaction workloads, and standard for everything else.
  • Redundancy: choose the cheapest option that meets the resilience requirement.
  • Reserved capacity: commit to storage for 1 or 3 years for a discount.

4. Protection and durability

Protects againstFeature
Hardware, zone or region failureRedundancy: LRS, ZRS, GRS, GZRS (RA- for readable secondary)
Accidental deletionSoft delete for blobs, containers and file shares
Accidental overwritesBlob versioning, point-in-time restore
Tampering, for regulatory retentionImmutable storage (time-based retention or legal hold)
Losing the whole account or malicious deletionAzure Backup vaulted backup to a separate vault

Example

A medical imaging company stores 2 PB of scans. New scans are read often for 30 days, then rarely, and must be kept unchanged for 10 years. The architect recommends Blob storage with GZRS, lifecycle rules moving blobs to cool after 30 days and archive after a year, and a time-based immutability policy of 10 years.

Exam traps to remember

  • Session is Cosmos DB's default consistency. Strong consistency limits multi-region write designs.
  • Redundancy protects against infrastructure failure, not against someone deleting data. You need soft delete or backup for that.
  • Archive tier isn't available on ZRS, GZRS or RA-GZRS accounts.
  • Data Lake Storage is Blob storage with the hierarchical namespace enabled, not a separate service.

Test yourself: 3 check questions and exam-style practice questions on this topic are in the AZ-305 Azure Solutions Architect app.

Practise in the app

Keep going