Azure Database Options Compared
SQL Database, SQL Managed Instance, SQL Server on VMs, Cosmos DB, PostgreSQL and MySQL compared by workload and management level.
By tools4free.dev · Last reviewed 4 December 2026
tools4free.dev is not affiliated with, endorsed by or sponsored by Microsoft. Facts below come from Microsoft Learn pages checked on 4 December 2026, linked in Sources. Confirm details on Learn before you rely on them.
The short answer
Start with the data model, then the amount of control. Relational data that uses the SQL Server engine has three homes. Azure SQL Database suits modern cloud applications. SQL Managed Instance suits most migrations of existing SQL Server applications that need instance-level features. SQL Server on Azure VMs suits anything that needs operating system access or full control of the engine. Open-source relational engines go to Azure Database for PostgreSQL or Azure Database for MySQL. Flexible, JSON-style data that must respond in milliseconds across regions goes to Azure Cosmos DB. The recurring exam question is "least administrative effort": prefer the most managed option that still meets every stated requirement.
The six options side by side
| Service | Category | Data model and engine | Control and size notes from Learn | Best for |
|---|---|---|---|---|
| Azure SQL Database | PaaS | Relational, SQL Server engine, latest stable version | Databases up to 128 TB; single databases, elastic pools, serverless and Hyperscale options; some SQL Server features unavailable (CLR is not supported) | Modern cloud apps; multitenant SaaS |
| SQL Managed Instance | PaaS | Relational, near 100% SQL Server compatibility | Up to 16 TB; native virtual network, private IP address; CLR supported | Migrating existing SQL Server applications with minimal changes |
| SQL Server on Azure VMs | IaaS | Relational, any supported SQL Server version and edition | Full control of the engine and the OS; up to 256 TB of storage; you manage the VM | OS-level access, full customisation, lift and shift |
| Azure Cosmos DB | PaaS, NoSQL | NoSQL and vector database; documents, key-value (Table API) and more | Single-digit millisecond responses, turnkey global distribution, multi-region writes with 99.999% SLA, automatic indexing, autoscale and serverless throughput | Globally distributed, low-latency, flexible-schema apps |
| Azure Database for PostgreSQL | PaaS | Relational, PostgreSQL | Burstable, General Purpose and Memory Optimized tiers; zone-redundant HA; backups kept 7 days by default, up to 35 | Open-source and analytics workloads, extensions such as PostGIS |
| Azure Database for MySQL | PaaS | Relational, MySQL Community Edition 5.7, 8.0 and 8.4 | Burstable, General Purpose and Memory Optimized tiers; zone-redundant HA; point-in-time restore up to 35 days | Lightweight web apps, for example WordPress |
Choose Azure SQL Database when
You are building a new cloud application or modernising one, and you want the latest stable SQL Server engine without patching, backups or infrastructure work. Learn names two deployment options. A single database has its own resources and suits new cloud-born applications, with serverless and Hyperscale available. An elastic pool shares resources across many databases and suits the multitenant SaaS pattern where usage varies. The Hyperscale tier (which Learn recommends for most business workloads) scales storage and compute independently and reaches 128 TB. Requirement words: "cloud-native", "SaaS", "serverless", "many databases with variable load".
Choose SQL Managed Instance when
The application is an existing SQL Server workload and the team wants PaaS without rewriting. Learn calls Managed Instance the best migration destination for most migrations, with almost all instance-level and database-level capabilities, a private IP address inside your virtual network and support for features such as CLR. It sits between Database and the VM: you keep SQL Server compatibility and get managed patching, backups and high availability. Requirement words: "minimal changes", "SQL Agent", "CLR", "instance-level features", "private IP in a virtual network", "no VM management". Learn warns that migrating applications with OS or SQL Agent dependencies to SQL Database can be challenging.
Choose SQL Server on Azure VMs when
Something in the requirement can only be met by controlling the VM or the engine. Learn lists full administrative control over SQL Server and the operating system, the ability to choose when maintenance happens, to change the recovery model to simple or bulk-logged, and to fully customise the engine. All supported versions and editions are available. The cost of that control is that you manage the VM. Learn also notes that PaaS options carry a higher guaranteed SLA than IaaS, especially with zone redundancy, so an IaaS design must add its own availability mechanisms such as Always On availability groups. Requirement words: "OS-level access", "specific SQL Server version or edition", "custom maintenance", "install third-party agents".
Choose Azure Cosmos DB when
The data is not relational, or the access pattern is key-based and must be fast at any scale. Learn describes Cosmos DB as a fully managed NoSQL and vector database with single-digit millisecond response times, automatic and instant scalability, turnkey global distribution and multi-region writes with a 99.999% SLA, change feed for event-driven designs, and automatic indexing. Throughput can be autoscale or serverless. The architecture guide lists Cosmos DB for NoSQL for custom JSON document models with SQL-like querying, and Cosmos DB for Table as the choice when migrating existing Azure Table Storage workloads. Requirement words: "globally distributed", "multi-region writes", "milliseconds", "flexible schema", "change feed", "JSON documents".
Choose PostgreSQL or MySQL when
The application already targets an open-source engine. For PostgreSQL, Learn highlights open-source extensions and PostGIS, elastic clusters, a built-in PgBouncer connection pooler, stop and start to lower cost, and zone-redundant high availability with a warm standby. For MySQL, Learn highlights the community edition, three compute tiers, managed maintenance windows, and a WordPress-based store as an example. Both services support high availability within a single zone or across zones. If the question says "migrate a PostgreSQL app" or "MySQL", do not translate it into SQL Database.
Worked scenarios
Requirement: A company is moving 40 on-premises SQL Server databases. The applications use SQL Agent jobs and CLR assemblies. The company wants minimal code changes and does not want to manage VMs or patches.
Answer: Azure SQL Managed Instance.
Why the others fail: SQL Database does not support CLR and is awkward for SQL Agent dependencies. SQL Server on a VM would work technically but leaves VM and patch management with the company. Cosmos DB, PostgreSQL and MySQL are different engines.
Requirement: A vendor application needs SQL Server on a specific edition and installs a monitoring agent at the OS level. The DBA team wants to choose when maintenance runs.
Answer: SQL Server on Azure VMs.
Why the others fail: OS-level access and full engine control are not available in SQL Database or Managed Instance. The trade-off is that the team now manages the VM and must design availability.
Requirement: A SaaS vendor hosts one database per customer. Customers' usage peaks at different times. The vendor wants to control cost while keeping tenant isolation, with no instance administration.
Answer: Azure SQL Database elastic pool.
Why the others fail: Learn positions elastic pools for multitenant SaaS patterns with variable usage. Managed Instance shares resources too but is aimed at migrations that need instance-level features. A VM per tenant multiplies administration.
Requirement: An online game stores player profiles as JSON. Players are on several continents, writes must be accepted in more than one region, and reads must return in single-digit milliseconds.
Answer: Azure Cosmos DB for NoSQL with multi-region writes.
Why the others fail: SQL Database, PostgreSQL and MySQL are relational services without the turnkey multi-region write model Learn describes for Cosmos DB. Table Storage is a low-cost key/attribute store without Cosmos DB's global distribution.
Common traps
- Choosing SQL Database for any SQL Server migration. Instance-scoped features, CLR and SQL Agent dependencies point to Managed Instance.
- Choosing a VM when "least administration" is stated. Use a VM only when OS access or full engine control is required.
- Comparing size limits wrongly. Learn lists 128 TB for a SQL Database, 16 TB for Managed Instance and 256 TB of storage for SQL Server on a VM.
- Assuming IaaS has the same SLA as PaaS. Learn says PaaS has the higher guaranteed SLA, especially with zone redundancy.
- Using Cosmos DB where relational joins and transactions are the point. Choose the relational services for those requirements.
- Forgetting Cosmos DB for Table. A requirement to keep the Table Storage API while gaining global distribution points here, not to SQL.
- Overlooking Hyperscale. Learn recommends the Hyperscale tier for most business workloads in SQL Database, and it is the answer when a question needs compute and storage that scale independently, up to 128 TB.
Quick reference for the exam
- New cloud app, serverless, Hyperscale, elastic pools: SQL Database
- Lift and shift with instance features, CLR, SQL Agent, private IP: Managed Instance
- OS access, any version or edition, you manage the VM: SQL Server on Azure VMs
- Global, milliseconds, multi-region writes, flexible schema: Cosmos DB
- PostgreSQL extensions or PostGIS: Azure Database for PostgreSQL
- MySQL, WordPress style web apps: Azure Database for MySQL
- Sizes: SQL Database 128 TB, Managed Instance 16 TB, SQL VM 256 TB
FAQ
Is Managed Instance fully compatible with SQL Server?
Learn describes near 100% compatibility with the latest Enterprise Edition database engine and says very few SQL Server features are not available. Full compatibility with every feature and the OS is only on SQL Server in a VM.
Do PaaS databases get patched for me?
Yes. For SQL Database and Managed Instance Learn says Microsoft handles patching, backups and high availability. PostgreSQL and MySQL flexible servers also automate patching of hardware, OS and engine with a configurable maintenance window.
When is Cosmos DB the wrong answer?
When the requirement is multi-row relational transactions, complex joins or an existing SQL Server or open-source relational application with minimal change.
Can I stop a database to save money?
PostgreSQL and MySQL flexible servers can be stopped and started, and Managed Instance supports stop and start. Check each service's page for the current limits.
Related study pages
- AZ-305: SQL platform choices
- AZ-305: SQL tiers
- AZ-305: SQL scalability
- AZ-305: Cosmos DB capacity
- AZ-305: Cosmos DB consistency
- AZ-305: PostgreSQL and MySQL
- AZ-305: Database business continuity
- AZ-305: Table Storage vs Cosmos DB for Table
Sources
- What is Azure SQL?
- What is the Azure SQL Database service?
- What is Azure SQL Managed Instance?
- SQL Server on Azure Virtual Machines overview
- Azure Cosmos DB introduction
- Azure Database for PostgreSQL flexible server overview
- Azure Database for MySQL flexible server overview
- Understand data models (Azure Architecture Center)