Domain 2 β€” Module 7 of 7 100%
14 of 27 overall
Domain 2: Relational Data on Azure Free ⏱ ~10 min read

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

Simple explanation

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

Azure relational database options compared
FeatureSQL DatabaseManaged InstanceSQL on VMsMySQLPostgreSQL
TypePaaSPaaSIaaSPaaSPaaS
EngineSQL ServerSQL ServerSQL ServerMySQLPostgreSQL
ManagementFully managedMostly managedYou manageFully managedFully managed
Best forNew cloud appsSQL Server migrationFull controlWeb/CMS appsComplex/GIS apps
CostLowestMediumHighestLowLow

Scenario practice

ScenarioBest ChoiceWhy
Jake builds a new SaaS app from scratchAzure SQL DatabaseNew app, minimal management, serverless option
Tom migrates SQL Server with SQL Agent jobsManaged InstanceNear-100% compatibility, SQL Agent supported
Aisha’s PHP app needs MySQLAzure DB for MySQLApp expects MySQL engine
Tom needs PostGIS for route optimisationAzure DB for PostgreSQLPostGIS extension for spatial queries
A company needs SQL Server 2016 specificallySQL Server on Azure VMsSpecific version not available in PaaS
A startup wants to pay nothing when idleAzure 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

Question

You need to migrate an on-premises SQL Server that uses cross-database queries and SQL Agent. Which Azure service?

Click or press Enter to reveal answer

Answer

Azure SQL Managed Instance β€” it provides near-100% SQL Server compatibility (including cross-database queries and SQL Agent) while still being a managed PaaS service.

Click to flip back

Question

What is the cheapest Azure SQL option for a new cloud-native app with variable traffic?

Click or press Enter to reveal answer

Answer

Azure SQL Database with the serverless compute tier β€” it auto-scales based on demand and auto-pauses when idle, so you only pay for actual usage.

Click to flip back

Question

When should you choose SQL Server on Azure VMs over Managed Instance?

Click or press Enter to reveal answer

Answer

When you need: full OS-level access, a specific SQL Server version not supported by Managed Instance, or third-party software that requires OS installation. For everything else, Managed Instance is better.

Click to flip back

Knowledge check

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?

Knowledge Check

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.