Choosing the Right Azure Database
Azure offers five relational database options. This decision guide helps you pick the right one for any scenario — the exact skill the exam tests.
The decision framework
Choosing a database is like choosing transport for a trip.
Flying (Azure SQL Database) gets you there fastest with minimal effort — perfect for new trips. A rental car (Managed Instance) gives you the freedom to drive your usual route. Owning a car (SQL Server on VMs) means full control — but you handle all maintenance. And if your trip needs a different vehicle entirely (MySQL or PostgreSQL), Azure has those too.
Decision tree
Ask these questions in order:
1. Does your app require MySQL or PostgreSQL?
- MySQL → Azure Database for MySQL
- PostgreSQL → Azure Database for PostgreSQL
- SQL Server or no preference → Continue to question 2
2. Is this a new application or an existing SQL Server migration?
- New application → Azure SQL Database (simplest, cheapest, fully managed)
- Existing SQL Server → Continue to question 3
3. Does the existing SQL Server use advanced features like cross-database queries, SQL Agent, or linked servers?
- Yes → Azure SQL Managed Instance
- No → Azure SQL Database (simpler and cheaper)
4. Do you need full OS access or a specific SQL Server version not supported by Managed Instance?
- Yes → SQL Server on Azure VMs
- No → Azure SQL Managed Instance
All five options at a glance
| Feature | SQL Database | Managed Instance | SQL on VMs | MySQL | PostgreSQL |
|---|---|---|---|---|---|
| Type | PaaS | PaaS | IaaS | PaaS | PaaS |
| Engine | SQL Server | SQL Server | SQL Server | MySQL | PostgreSQL |
| Management | Fully managed | Mostly managed | You manage | Fully managed | Fully managed |
| Best for | New cloud apps | SQL Server migration | Full control | Web/CMS apps | Complex/GIS apps |
| Cost | Lowest | Medium | Highest | Low | Low |
Scenario practice
| Scenario | Best Choice | Why |
|---|---|---|
| Jake builds a new SaaS app from scratch | Azure SQL Database | New app, minimal management, serverless option |
| Tom migrates SQL Server with SQL Agent jobs | Managed Instance | Near-100% compatibility, SQL Agent supported |
| Aisha’s PHP app needs MySQL | Azure DB for MySQL | App expects MySQL engine |
| Tom needs PostGIS for route optimisation | Azure DB for PostgreSQL | PostGIS extension for spatial queries |
| A company needs SQL Server 2016 specifically | SQL Server on Azure VMs | Specific version not available in PaaS |
| A startup wants to pay nothing when idle | Azure SQL Database (serverless) | Auto-pause and auto-scale |
Exam tip: the 'which service' pattern
This is one of the most common exam question patterns. The exam gives you a scenario with constraints and asks you to pick the best Azure database service. Key phrases to look for:
- “Minimal management” / “fully managed” → PaaS options (SQL Database, MySQL, PostgreSQL)
- “Migrate existing SQL Server” → Managed Instance (first choice) or VMs (if MI doesn’t support the feature)
- “Full OS access” → SQL Server on VMs
- “WordPress” / “PHP” / “LAMP stack” → Azure Database for MySQL
- “Spatial data” / “PostGIS” / “advanced JSON” → Azure Database for PostgreSQL
- “Pay only when active” → Azure SQL Database (serverless)
Flashcards
Knowledge check
A university department runs WordPress on an on-premises LAMP stack (Linux, Apache, MySQL, PHP). They want to move to Azure with minimal code changes. Which database service should they use?
A company is building a brand-new microservices application. They want the simplest, cheapest Azure database that auto-pauses when there's no traffic. Which option?
🎬 Video coming soon
You’ve completed Domain 2! 🎉 You now understand relational data concepts, SQL, database objects, and all five Azure relational database services.
Next up: Azure Blob Storage: Files in the Cloud — let’s explore non-relational data storage.