Why Relational Databases?
Relational databases remain the backbone of most enterprise applications. In Azure, you can deploy SQL in three different ways depending on the level of control, compatibility, and management you need. The exam expects you to know when to choose SQL Database, Managed Instance, or SQL on VMs.
1. Azure SQL Database (PaaS)
Definition:
A fully managed Platform-as-a-Service (PaaS) database for modern applications.
Key Features:
-
Built-in HA and backups.
-
Autoscaling (serverless or elastic pools).
-
Advanced security (TDE, Always Encrypted, Data Masking).
-
Hyperscale option → scale to 100 TB.
-
No OS or patching management needed.
Best For:
-
Cloud-native apps.
-
Applications requiring rapid scaling.
-
SaaS platforms with variable workloads.
2. Azure SQL Managed Instance (MI – PaaS with more compatibility)
Definition:
Managed SQL instance that provides near-full SQL Server compatibility with PaaS benefits.
Key Features:
-
Supports cross-database queries, linked servers.
-
Supports SQL Agent jobs, Service Broker.
-
VNet integration (private IPs).
-
Native restore from SQL Server backups.
-
Built-in HA.
Best For:
-
Lift-and-shift migrations from on-prem SQL with minimal changes.
-
Enterprise workloads needing SQL Server features not available in SQL Database.
-
Hybrid connectivity with on-prem networks.
3. SQL Server on Azure VMs (IaaS)
Definition:
SQL Server installed on Windows/Linux VMs — Infrastructure-as-a-Service (IaaS).
Key Features:
-
Full control over SQL Server and OS.
-
Supports custom configurations, 3rd-party agents.
-
Can use Always On Availability Groups for HA/DR.
-
Requires patching and backups management.
Best For:
-
Legacy apps requiring full SQL Server compatibility.
-
Apps that need OS-level or SQL Server instance-level customization.
-
Migration of apps not compatible with PaaS options.
4. Comparison
| Feature | SQL Database | SQL Managed Instance | SQL on VMs |
|---|---|---|---|
| Type | PaaS | PaaS (near-full SQL) | IaaS |
| Management | Microsoft-managed | Microsoft-managed | Customer-managed |
| Compatibility | Limited (no Agent) | High (Agent, jobs, X-DB) | Full (all features) |
| Scaling | Elastic, serverless | Instance-level scaling | VM-based scaling |
| Best For | Cloud-native apps | Lift-and-shift DBs | Legacy/Custom apps |
Example Enterprise Scenario
A global retailer requires:
-
E-commerce site DB that can autoscale during peak shopping.
-
Migration of ERP DB with cross-database dependencies.
-
A legacy HR system that needs OS-level customization.
Correct design:
-
Use SQL Database serverless for the e-commerce site.
-
Use SQL Managed Instance for ERP migration.
-
Use SQL Server on VM for HR legacy system.
Confusion Buster
-
SQL Database vs Managed Instance
-
SQL DB = modern apps, lightweight.
-
MI = enterprise migrations, higher compatibility.
-
-
SQL on VMs vs Managed Instance
-
SQL VM = full control, customer-managed.
-
MI = managed by Microsoft, fewer admin tasks.
-
-
Elastic Pools vs Hyperscale
-
Elastic Pools = share resources across multiple DBs.
-
Hyperscale = single DB scaling to 100 TB.
-
Exam Tips
-
“Which SQL option supports SQL Agent jobs?” → Managed Instance or SQL on VM.
-
“Which SQL option is best for cloud-native apps?” → SQL Database.
-
“Which option provides full OS-level control?” → SQL on VMs.
-
“Which option allows restoring native SQL backups directly?” → Managed Instance.
What to Expect in the Exam
-
Direct Q: “Which SQL option allows near full compatibility with on-prem SQL Server?” → Managed Instance.
-
Scenario Q: “Company wants to migrate DBs with cross-database queries.” → Managed Instance.
-
Scenario Q: “Company requires SQL DB that scales automatically with usage.” → SQL Database (serverless).
-
Scenario Q: “Company wants to run SQL Server with third-party monitoring agents.” → SQL on VMs.
-
Trick Q: “SQL Database supports SQL Server Agent jobs.” → False.