2.10 Azure Database Services

Key Takeaways

  • Azure SQL Database is fully managed PaaS based on the latest stable SQL Server engine, with a 99.99% availability SLA and serverless auto-scaling.
  • Azure SQL Managed Instance gives near-100% on-premises SQL Server compatibility (SQL Server Agent, cross-database queries, CLR) for lift-and-shift migrations.
  • SQL Server on Azure VMs is the IaaS option when you need full OS and instance control.
  • Azure Cosmos DB is globally distributed multi-model NoSQL with single-digit-millisecond latency, five consistency levels, and a 99.999% multi-region SLA.
  • Azure Database for MySQL and PostgreSQL are managed open-source engines; MariaDB is retired, so migrate those workloads to MySQL.
Last updated: June 2026

Quick Answer: Azure SQL Database = fully managed SQL Server (PaaS) for new apps. SQL Managed Instance = near-100% SQL Server compatibility for migrations. SQL Server on Azure VMs = IaaS, full control. Cosmos DB = globally distributed multi-model NoSQL, single-digit-millisecond latency. Managed open-source: MySQL and PostgreSQL (MariaDB is retired). On the exam, the verbs "migrate existing," "globally distributed," and "build new" each point to a different service.

The Relational Options (the PaaS-to-IaaS ladder)

Azure SQL Database

Azure SQL Database is a fully managed platform-as-a-service (PaaS) relational engine built on the latest stable version of Microsoft SQL Server. Azure handles OS patching, engine updates, backups, monitoring, and high availability, and provides a 99.99% availability SLA. Notable capabilities:

  • Serverless tier that auto-scales compute and auto-pauses when idle, billing per second — ideal for spiky or intermittent workloads.
  • Elastic pools that share a budget of compute across many databases so unpredictable individual loads even out.
  • Intelligent features: automatic tuning, threat detection, and vulnerability assessment.

Two purchasing models appear on the exam:

ModelHow you payPick when
DTU (Database Transaction Unit)Bundled compute + storage + I/OYou want simple, one-dial pricing
vCoreChoose vCores and storage separatelyYou need flexibility or Azure Hybrid Benefit

A worked example: a startup ships a new web app whose traffic is light and bursty. Serverless SQL Database is the cost-smart pick because compute scales down and pauses during quiet hours, so you stop paying for idle compute — versus a fixed provisioned tier billing 24/7. If that same startup later runs 50 small per-tenant databases with unpredictable individual spikes, an elastic pool lets them share one compute budget instead of over-provisioning each database.

Azure SQL Managed Instance

SQL Managed Instance targets customers moving existing on-premises SQL Server databases to the cloud with near-100% compatibility. It is still PaaS (Azure patches and backs up), but it restores instance-level features that SQL Database lacks.

FeatureSQL DatabaseSQL Managed Instance
Cross-database queriesLimitedYes
SQL Server Agent (jobs)NoYes
CLR (Common Language Runtime)NoYes
Database MailNoYes
Best forNew cloud-native appsLift-and-shift migrations

SQL Server on Azure VMs

When an app needs full control of the operating system and the SQL Server instance (specific build, OS-level agents, third-party extensions), run SQL Server on an Azure Virtual Machine. This is infrastructure-as-a-service (IaaS): you own patching and configuration. The three options form a ladder — VM (most control, most work) -> Managed Instance -> SQL Database (least work).

Azure Cosmos DB (the NoSQL flagship)

Azure Cosmos DB is Microsoft's globally distributed, multi-model NoSQL service for mission-critical apps:

CapabilityDetail
Global distributionAdd or remove regions with a click; multi-region writes
LatencySingle-digit-millisecond reads and writes at the 99th percentile
Availability SLAUp to 99.999% for multi-region accounts
Elastic throughputScales request units automatically or manually
ConsistencyFive tunable levels

Five Consistency Levels

From strongest to weakest: Strong, Bounded staleness, Session, Consistent prefix, Eventual. Strong always returns the latest committed write but adds latency because it confirms replication first; Eventual is fastest and cheapest but readers may briefly see stale data. This is the classic trade-off: stronger consistency costs latency and throughput.

Cosmos DB APIs

APIData modelCompatible with
NoSQL (native)Document (JSON)Cosmos DB native
MongoDBDocument (BSON)MongoDB wire protocol
CassandraWide-columnApache Cassandra
GremlinGraphApache TinkerPop
TableKey-valueAzure Table Storage

On the Exam: The phrases "globally distributed," "multi-region writes," "single-digit-millisecond latency," "graph" (Gremlin), or "existing MongoDB app" all point to Cosmos DB.

Managed Open-Source Engines

ServiceEngineNote
Azure Database for MySQLMySQLFlexible Server, zone-redundant HA
Azure Database for PostgreSQLPostgreSQLFlexible Server; Citus for sharded scale-out
Azure Database for MariaDBMariaDBRetired — migrate to MySQL

All three are PaaS: Azure runs the host OS, patches the engine, takes automated backups, and offers built-in high availability, so your team only manages schemas and data. They are the right answer whenever a question names an existing open-source engine ("we run PostgreSQL on-premises and want it managed") rather than asking you to re-platform onto SQL Server or Cosmos DB.

Cost and Management Trade-off

A useful mental model for the relational ladder: as you move from IaaS toward PaaS you trade control for lower operational effort.

OptionYou manageAzure manages
SQL Server on Azure VM (IaaS)OS, patches, backups, instanceHardware, virtualization
SQL Managed Instance (PaaS)Database, securityOS, patching, backups, HA
SQL Database (PaaS)Database, securityOS, patching, backups, HA, scaling

Decision Guide

ScenarioService
New cloud-native relational appAzure SQL Database
Migrate existing SQL Server, minimal changeSQL Managed Instance
Need full OS/instance controlSQL Server on Azure VMs
Globally distributed low-latency NoSQLCosmos DB
Existing MongoDB/Cassandra/graph appCosmos DB (matching API)
Open-source MySQL or PostgreSQLAzure Database for MySQL/PostgreSQL
Test Your Knowledge

An organization is migrating a decade-old on-premises SQL Server database that relies on SQL Server Agent jobs and cross-database queries, and wants minimal code changes. Which service fits best?

A
B
C
D
Test Your Knowledge

A retail app needs to serve a product catalog from regions worldwide with guaranteed single-digit-millisecond reads and the ability to write in multiple regions. Which service is the answer?

A
B
C
D
Test Your Knowledge

In Cosmos DB, which consistency level always returns the most recent committed write but adds the most latency?

A
B
C
D
Test Your Knowledge

A team wants a fully managed relational database for a brand-new app, prefers not to patch any OS or SQL engine, and wants compute to pause automatically when idle. Which option fits?

A
B
C
D