Azure SQL, SQL Managed Instance and Cosmos DB

🖥️SQL Server on VMIaaS: full control🏢SQL Managed InstancePaaS: near 100% SQL Server☁️Azure SQL DatabasePaaS: fully managed🌍Azure Cosmos DBNoSQL, global, fastMore controlLess management
From full control to fully managed: pick the database that fits your data and your team.

😟 THE PROBLEM

The team runs its own database servers and spends nights patching and fixing backups.

😊 THE SOLUTION

Choose a managed Azure database such as SQL Database or Cosmos DB.

  • Patching database servers✓ PaaS databases are patched for you
  • Global users need fast data✓ Cosmos DB multi-region
  • Migrating old SQL Server✓ SQL Managed Instance
🛠️ Solved with: Azure SQL · Managed Instance · Cosmos DB
Module 2: Architecture & Services ⏱ 6 min read Updated 11 Nov 2026 Beyond the exam: real-world knowledge

Quick answer

Azure offers databases from most control to most managed. SQL Server on Azure VMs (IaaS) gives full control. Azure SQL Managed Instance (PaaS) offers near-complete SQL Server compatibility for easy migrations. Azure SQL Database (PaaS) is a fully managed modern database. Azure Cosmos DB is a globally distributed NoSQL database with very low latency.

Start with a question

Your shopping app needs a database. Do you install one yourself or let Azure run it?

Azure offers both, and several options in between.

Explain it like I’m 10

The technical explanation

OptionTypeBest for
SQL Server on Azure VMsIaaSFull control, specific versions, OS access
Azure SQL Managed InstancePaaSMigrating existing SQL Server with minimal changes
Azure SQL DatabasePaaSNew cloud apps, serverless and Hyperscale options
Azure Cosmos DBPaaS NoSQLGlobal apps needing low latency and flexible schema

Real-world business scenario

Gaming

A global gaming company

The problem
Player profiles needed fast reads and writes worldwide, and the purchase ledger needed strict relational integrity.
What they used
Cosmos DB with multi-region writes for profiles; Azure SQL Database for purchases.
Why that choice
Each data shape gets the right database.
The result
Fast profiles everywhere and reliable purchase records.

When to use it and when not to

✓ Use it when…

  • **SQL Database** for most new relational apps.
  • **Managed Instance** for SQL Server migrations.
  • **Cosmos DB** for global, low-latency NoSQL.

✕ Think twice when…

  • Running your own SQL on VMs unless you need the control.
Ready for more?The full lesson adds the technical explanation, when to use it, interview questions and revision notes.

Interview preparation

Say your answer out loud first, then open the model answer. Interviewers care more about your reasoning than the exact words.

Beginner What is the difference between Azure SQL Database and Cosmos DB?

Model answer

Azure SQL Database is a relational database with tables and SQL queries. Cosmos DB is a NoSQL database for flexible JSON-style data that can be replicated globally with very low latency.

Intermediate When would you choose SQL Managed Instance over SQL Database?

Model answer

When migrating existing SQL Server databases that rely on instance-level features such as SQL Agent jobs, cross-database queries or CLR, and you want PaaS with minimal changes.

Experienced developer When would you still run SQL Server on a VM?

Model answer

When you need OS-level access, a specific SQL Server version or feature not available in PaaS, third-party software installed alongside, or full control of patch timing. The trade-off is that you manage patching, backups and high availability yourself.

Test yourself with exercises

3 original practice questions in the AZ-900 style. Pick your answers, then check them. You will see why each option is right or wrong. Score 75% or more and this topic is marked complete.

Question 1

Question 1 of 3

Which option offers near-100% SQL Server compatibility as a PaaS service, ideal for migrations?

Question 2

Question 2 of 3

Which database is globally distributed NoSQL with very low latency?

Question 3

Question 3 of 3

Which option gives you full control of the operating system and SQL Server?

Quick revision

Key points

  • SQL on VM = IaaS, full control.
  • SQL Managed Instance = PaaS, near-full SQL Server compatibility.
  • SQL Database = fully managed PaaS.
  • Cosmos DB = global, low-latency NoSQL.

Important terminology

Azure SQL Database
Fully managed PaaS relational database based on the SQL Server engine.
SQL Managed Instance
PaaS with near-100% SQL Server compatibility, ideal for lift-and-shift.
Azure Cosmos DB
Globally distributed, multi-model NoSQL database with low latency and elastic scale.

Common mistakes

  • Using Cosmos DB for heavily relational, join-based workloads.

Exam tips

  • Databases are not in the current AZ-900 outline, but they appear often in interviews.

Five quick revision questions

  1. 1.Which option gives full control of SQL Server?Show

    SQL Server on Azure VMs.

  2. 2.Which PaaS option is best for lift-and-shift of SQL Server?Show

    Azure SQL Managed Instance.

  3. 3.Which option is a globally distributed NoSQL database?Show

    Azure Cosmos DB.

  4. 4.Which cloud service type is Azure SQL Database?Show

    PaaS.

  5. 5.Who patches Azure SQL Database?Show

    Microsoft.

Official references

Make it stick: play a quick gameSort It, Match the Pairs, Lightning Round and Who Am I? Earn XP and badges. Play ❯

Finished this lesson? Tick it off. Your progress is saved in this browser.

Next up: Microsoft Entra ID and Entra Domain Services