Design semi-structured and unstructured data storage
Cosmos DB and Table Storage for semi-structured data, Blob Storage and Data Lake for unstructured data, balancing cost and performance, and durability.
- 16 min
- 4 concepts
- Try it yourself
- 4-question check
Learn
Not all data fits in tables with fixed columns. Semi-structured data (JSON documents, key-value pairs) and unstructured data (files, images, video, logs) have their own Azure services, each with trade-offs between features, speed and cost.
- 1
Recommend a solution for storing semi-structured data
Azure Cosmos DB: globally distributed, single-digit millisecond NoSQL with multiple APIs (NoSQL, MongoDB, Apache Cassandra, Apache Gremlin, Table, PostgreSQL), multi-region writes and five consistency levels (strong, bounded staleness, session, consistent prefix, eventual). Choose a good partition key. Table Storage is a cheaper key-value store for simple, lower-scale needs.
Remember: Global, low latency, multi-region writes: Cosmos DB.
- 2
Recommend a solution for storing unstructured data
Blob Storage for objects (documents, media, backups). Azure Data Lake Storage (blob storage with hierarchical namespace) for analytics, with directories and POSIX-style ACLs. Azure Files for SMB/NFS shares. Azure NetApp Files for high-performance enterprise file workloads.
Remember: Analytics on files: Data Lake Storage (hierarchical namespace).
- 3
Recommend a data storage solution to balance features, performance, and costs
Use access tiers (hot, cool, cold, archive) and lifecycle management to move data as it ages. Use premium block blob or file storage for low latency. For Cosmos DB, choose provisioned throughput (with autoscale) for steady traffic or serverless for spiky, light workloads, and reserved capacity for steady use.
Remember: Let lifecycle rules move ageing data to cheaper tiers.
- 4
Recommend a data solution for protection and durability
Pick redundancy (LRS, ZRS, GRS, GZRS, RA variants) to match failure tolerance. Protect against mistakes with soft delete, versioning, point-in-time restore for blobs and immutable storage (WORM: time-based retention or legal hold) for compliance. Cosmos DB offers continuous backup with point-in-time restore.
Remember: Regulators need unchangeable data: immutable storage.
Cosmos DB consistency levels
| Level | Guarantee | Trade-off |
|---|---|---|
| Strong | Always reads the latest write | Highest latency |
| Bounded staleness | Lag limited by time or versions | Predictable lag |
| Session (default) | Read your own writes | Good balance |
| Consistent prefix | Never out of order | May lag |
| Eventual | Eventually consistent | Lowest latency and cost |
Try it
Which service or feature fits?
This interactive part needs JavaScript.
In the portal
- Cosmos DBAzure portal: Azure Cosmos DB > Create
- Hierarchical namespaceAzure portal: Storage accounts > Create > Advanced > Enable hierarchical namespace
- ImmutabilityAzure portal: Storage accounts > your account > Containers > your container > Access policy
Key terms
Click a card to see the definition.
Check your understanding
4 questions. Score 80% or more and these skills are marked as confident in your AZ-305 study plan.
Which is the default Cosmos DB consistency level?
Session is the default.
What turns Blob Storage into Data Lake Storage?
HNS adds directories and ACLs.
Which Cosmos DB option suits occasional, spiky traffic?
Pay per request.
Which feature stops anyone deleting data during a legal case?
Legal hold blocks deletion until cleared.
Sources
- Microsoft Learn: Consistency levels in Azure Cosmos DB
- Microsoft Learn: Azure Data Lake Storage introduction
- Microsoft Learn: Immutable storage for blob data
- Microsoft Learn: Cosmos DB serverless
Facts in this lesson are from Microsoft Learn. This site isn't affiliated with Microsoft.