Azure Database Services: Azure SQL, Cosmos DB, MySQL, PostgreSQL and Choosing the Right Database
Relational and NoSQL
| Relational (SQL) | NoSQL | |
|---|---|---|
| Data shape | Tables with rows and columns, fixed schema | Flexible: documents, key-value, graph |
| Strength | Joins, transactions, strong consistency | Huge scale, fast, flexible schema |
| Azure example | Azure SQL Database | Azure Cosmos DB |
Azure SQL Family
| Option | Type | Use for |
|---|---|---|
| Azure SQL Database | PaaS, single database or elastic pool | New cloud apps with no server management |
| Azure SQL Managed Instance | PaaS with near full SQL Server compatibility | Move existing SQL Server apps with few changes |
| SQL Server on a VM | IaaS | Full control, old versions, special features |
Benefits of Managed (PaaS) Databases
- Automatic backups, patching and updates
- Built-in high availability
- Scale up or down quickly
- Built-in security such as encryption and threat detection
Azure Cosmos DB
- A globally distributed NoSQL database with very low latency
- Choose your API: NoSQL, MongoDB, Cassandra, Gremlin (graph), Table, PostgreSQL
- Turnkey global replication to regions near users
- Used for IoT, gaming, retail catalogs and apps needing instant response worldwide
Open-Source Databases
- Azure Database for MySQL: managed MySQL
- Azure Database for PostgreSQL: managed PostgreSQL
- Good when your app already uses these engines
Choosing
| Need | Choose |
|---|---|
| New app with relational data, no server care | Azure SQL Database |
| Migrate SQL Server with minimal change | SQL Managed Instance |
| Global, flexible, fast documents | Cosmos DB |
| App built on MySQL or PostgreSQL | Azure Database for MySQL or PostgreSQL |
Practice
- Which database suits a worldwide mobile game with flexible data?
- What is the difference between Azure SQL Database and SQL on a VM?
- Name two benefits of a PaaS database
Conclusion
Use Azure SQL options for relational data, Cosmos DB for global NoSQL and managed MySQL or PostgreSQL for those engines. Managed databases handle backups, patching and availability.
Quick Summary: models; SQL family; benefits; Cosmos DB; open-source; choosing.

