Skip to content
6 min read·Lesson 6 of 10

Azure Database Services

Compare Azure's database portfolio — Azure SQL, Cosmos DB, Azure Database for PostgreSQL/MySQL, and Azure Cache for Redis — and learn when to use each.

Azure provides a comprehensive portfolio of managed database services. Picking the right one depends on your data model, consistency requirements, expected scale, and team expertise.

Azure SQL Database

Azure SQL Database is a fully managed, cloud-native relational database built on Microsoft SQL Server. It supports multiple deployment models:

  • Single Database: Isolated database with dedicated resources. Best for new cloud applications.
  • Elastic Pool: Multiple databases sharing a resource pool. Cost-effective for SaaS apps with variable per-tenant load.
  • Managed Instance: Near-100% SQL Server compatibility. Ideal for lift-and-shift migrations that rely on SQL Server-specific features.

Key features: automatic backups, point-in-time restore up to 35 days, built-in high availability (99.99% SLA), intelligent query processing, and Microsoft Defender for SQL.

Azure Database for PostgreSQL and MySQL

Fully managed open-source relational databases — same familiar engines, without the operational overhead.

  • Azure Database for PostgreSQL — supports Flexible Server (recommended), with zone-redundant HA and read replicas
  • Azure Database for MySQL — supports Flexible Server with similar HA options

Best for: Teams already using PostgreSQL or MySQL on-premises and wanting a managed cloud equivalent with minimal migration effort.

Azure Cosmos DB

Cosmos DB is Azure's globally distributed, multi-model NoSQL database. It's designed for applications that need low latency at global scale.

Key capabilities:

  • Multi-model APIs: NoSQL (document), MongoDB, Cassandra, Table, Gremlin (graph) — same underlying engine
  • Global distribution: Replicate data to any number of Azure regions with a single click
  • Five consistency levels: Strong, Bounded Staleness, Session (default), Consistent Prefix, Eventual
  • Guaranteed SLAs: 99.999% availability, <10ms reads, <15ms writes at p99
  • Serverless mode: Pay per request — ideal for variable or spiky workloads

Best for: Global web and mobile apps, IoT telemetry, real-time personalisation, e-commerce product catalogs — wherever you need low latency at scale and flexible schema.

Azure Cache for Redis

A fully managed, in-memory data store based on Redis. Used for:

  • Session caching — store user session state at sub-millisecond speed
  • Database query caching — reduce database load for frequently read data
  • Message brokering — pub/sub and stream processing
  • Leaderboards and real-time counters

Choosing the Right Database

NeedAzure Service
SQL Server-compatible relationalAzure SQL Database / Managed Instance
Open-source PostgreSQLAzure Database for PostgreSQL
Open-source MySQL / MariaDBAzure Database for MySQL
Global NoSQL documentsCosmos DB (NoSQL API)
MongoDB-compatible NoSQLCosmos DB for MongoDB
Cassandra-compatible wide-columnCosmos DB for Cassandra
In-memory cachingAzure Cache for Redis
Data warehouse analyticsAzure Synapse Analytics
AZ-900 exam tip: Know the difference between relational (Azure SQL) and NoSQL (Cosmos DB) databases and their use cases. For the AZ-204 Developer exam, also know the Cosmos DB consistency models and partition key design.

Key Takeaways

  • Azure SQL Database is the fully managed cloud relational database based on SQL Server.
  • Azure Cosmos DB is a globally distributed, multi-model NoSQL database with single-digit millisecond latency.
  • Azure Database for PostgreSQL and MySQL are open-source managed relational databases.
  • Azure Cache for Redis provides in-memory caching for low-latency data access.
  • Choosing the right database depends on data model, consistency needs, and scale requirements.

Test your knowledge

Try exam-style practice questions to reinforce what you've learned.

Practice Questions →