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?
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.