Path 4 · Module 2
Design a data storage solution for relational data
Read the module on Microsoft Learn, then come back here: test yourself with the quiz and apply it in the design exercise. Write down what you want to remember with the ✎ Note buttons.
Step 1 · Read the module
Open Design a data storage solution for relational data on Microsoft Learn. The units:
- Introduction
- Design for Azure SQL Database
- Design for Azure SQL Managed Instance
- Design for SQL Server on Azure Virtual Machines
- Recommend a solution for database scalability
- Recommend a solution for database availability
- Design security for data at rest, data in motion, and data in use
- Design for Azure Cosmos DB and Table Storage
- Module assessment
- Summary and resources
Close the Learn tab. Answering from memory is what makes it stick; looking it up just measures how fast you can scroll.
Quiz
20 exam-style questions, roughly in the order of the units. Click an answer to see the explanation. Your best score is saved and shown on the path page; use Retry at the end to go again.
1. A new cloud-native app needs a fully managed relational database with no OS or instance management. Which service?
D. SQL Database is the PaaS option with the least management for single databases.
2. An on-premises SQL Server uses SQL Agent jobs, cross-database queries and CLR. You want PaaS with minimal changes. Which service?
A. Managed Instance offers near 100% SQL Server compatibility, including Agent and cross-database queries.
3. Which requirement forces you to SQL Server on Azure VMs instead of PaaS?
D. VMs give full control of OS and instance; PaaS covers backups, HA and TDE for you.
4. Forty small SaaS tenant databases have unpredictable, non-overlapping peaks. How do you control cost?
B. Elastic pools share resources among databases with varying usage.
5. A dev database is used a few hours a day. Cheapest compute model?
A. Serverless scales compute automatically and pauses when idle, so you pay only storage then.
6. A database will grow to 50 TB and needs fast backups and restores regardless of size. Which tier?
B. Hyperscale supports up to 128 TB with snapshot-based backups and fast scaling.
7. Which service tier gives the lowest latency storage and a free readable secondary replica?
C. Business Critical uses local SSD and Always On replicas; one replica can serve read-only traffic.
8. Reporting queries slow down the OLTP database. Cheapest fix within the same database?
D. Business Critical and Premium include a readable replica at no extra cost.
9. Data must be split across many databases by customer ID to scale beyond one database. What's this called?
B. Sharding distributes rows over databases; Elastic Database tools help route queries.
10. Azure SQL Database must survive a zone failure in the region. What do you enable?
A. Zone redundancy spreads replicas over availability zones.
11. Which feature encrypts SQL data files and backups at rest, on by default?
D. TDE encrypts data at rest transparently to the application.
12. Credit card numbers must be encrypted so that even DBAs can't read them; only the app holds the keys. Which feature?
B. Always Encrypted protects data in use: the database only sees ciphertext.
13. Support staff should see only the last 4 digits of phone numbers in query results. Which feature?
A. Masking hides data in results for non-privileged users without changing stored data.
14. Each sales rep may only see rows for their own customers. Which feature?
A. Row-level security filters rows with a predicate function based on the user.
15. How do you protect data in transit to Azure SQL?
C. Encryption in transit is TLS. TDE is at rest; Always Encrypted is in use.
16. A globally distributed app needs single-digit millisecond reads and writes in several regions, with a flexible JSON schema. Which service?
A. Cosmos DB is designed for global distribution and multi-region writes.
17. Which Cosmos DB consistency level is the default, giving read-your-own-writes within a session?
B. Session consistency is the default and balances consistency, latency and throughput.
18. An existing MongoDB app moves to Azure with minimal code changes. Which option?
D. Cosmos DB offers wire-compatible APIs for MongoDB, Cassandra, Gremlin and Table.
19. A simple key-value store for a few GB of device metadata must be as cheap as possible, without global distribution. Which service?
A. Table Storage is a low-cost NoSQL key-value store. Cosmos DB for Table adds global distribution and SLAs at higher cost.
20. Why does choosing the partition key matter in Cosmos DB?
D. Choose a key with high cardinality and even access to scale out.
Design exercise
On paper · about 25 minutes
Fernhill Travel has four data stores to migrate or build:
- A booking database on SQL Server 2016 with SQL Agent jobs and cross-database queries (2 TB).
- A new loyalty app for 30 countries with users updating their profile from anywhere, low latency.
- An internal reporting database used 9–17 on weekdays.
- A legacy app that needs SQL Server Reporting Services on the same server and a third-party agent on the OS.
Passport numbers must be unreadable to DBAs. All databases must survive a zone failure.
-
Task
Pick the data platform for each workload
Choose the service, tier and compute model per workload, with one sentence why.
Done when- Each workload has service + tier.
- The reasons refer to a requirement.
Model answer
- Booking: SQL Managed Instance, Business Critical or General Purpose (Agent, cross-db).
- Loyalty: Cosmos DB for NoSQL, multi-region writes, session consistency.
- Reporting: SQL Database serverless.
- Legacy: SQL Server on Azure VM (OS access, SSRS).
-
Task
Design availability and scale
How does each store survive a zone failure, and how would booking reports avoid slowing down bookings?
Done when- Zone resilience is named per store.
- A read-scale option is used.
Model answer
Zone-redundant MI / SQL Database; Cosmos DB with availability zones in each region; VM: two VMs in two zones with an Always On AG. Booking reports use the Business Critical read-only replica.
-
Task
Protect the data
List protection at rest, in transit and in use, plus the passport-number rule.
Done when- Three states of data are covered.
- DBAs can't read passport numbers.
Model answer
At rest: TDE (CMK if required). In transit: TLS 1.2 minimum, private endpoints. In use: Always Encrypted (with secure enclaves if queries need it) for passport numbers; dynamic data masking for support; Entra-only authentication; auditing and Defender for SQL.