This domain is worth 20 to 25% of DP-900. Expect two kinds of question: recognise a relational concept or SQL statement, and choose between Azure SQL Database, SQL Managed Instance, SQL Server on a VM and the open-source database services. You will not write long queries, but you must read short ones.
Relational concepts
Features of relational data
- Data is stored in tables (relations). Each row (tuple, record) is one instance of an entity; each column (attribute, field) has one data type.
- Tables have a fixed schema and are linked by keys.
- Queried with SQL (Structured Query Language).
- Enforces integrity with constraints and supports ACID transactions.
Keys
| Key | Purpose |
|---|---|
| Primary key | Uniquely identifies each row; cannot be null; one per table (may span several columns) |
| Foreign key | A column referencing another table’s primary key; creates the relationship and enforces referential integrity (no order for a customer who doesn’t exist) |
Relationship types
- One-to-many (one customer, many orders) is the most common.
- Many-to-many needs a junction table with foreign keys to both sides (students and courses via an enrolment table).
- One-to-one is rare; used to split off rarely used columns.
Normalization
Normalization is organising tables to remove redundancy and avoid update anomalies.
- Each fact is stored once. Customer address lives in a Customer table, not repeated in every order row.
- Typical steps: no repeating groups or multi-valued columns (1NF); every non-key column depends on the whole key (2NF); non-key columns depend only on the key, not on each other (3NF).
- Benefits: less storage, consistent updates, fewer anomalies. Cost: more tables and joins, which can slow heavy read queries.
- OLTP databases are normalised; analytical stores are often deliberately denormalised (star schema) for fast reads.
SQL
SQL statements fall into groups:
| Group | Statements | Purpose |
|---|---|---|
| DDL (data definition language) | CREATE, ALTER, DROP, TRUNCATE |
Define and change structures |
| DML (data manipulation language) | INSERT, UPDATE, DELETE, SELECT |
Work with rows |
| DCL (data control language) | GRANT, REVOKE, DENY |
Permissions |
| TCL | BEGIN TRANSACTION, COMMIT, ROLLBACK |
Transactions |
Azure SQL uses T-SQL (Transact-SQL), Microsoft’s SQL dialect. PostgreSQL uses PL/pgSQL and MySQL has its own dialect, but the core statements are the same.
Statements to read fluently
SELECT FirstName, LastName FROM Customers WHERE City = 'Leeds' ORDER BY LastName;
INSERT INTO Customers (FirstName, LastName, City) VALUES ('Ana', 'Silva', 'Leeds');
UPDATE Customers SET City = 'York' WHERE CustomerId = 7;
DELETE FROM Customers WHERE CustomerId = 7;
SELECT c.LastName, SUM(o.Total) AS Spend
FROM Customers AS c
JOIN Orders AS o ON o.CustomerId = c.CustomerId
GROUP BY c.LastName
HAVING SUM(o.Total) > 1000;
WHEREfilters rows before grouping;HAVINGfilters groups after aggregation.GROUP BYgroups; aggregates areCOUNT,SUM,AVG,MIN,MAX.- Joins:
INNER JOINreturns matching rows only;LEFT JOINkeeps all rows from the left table;RIGHTkeeps the right;FULLkeeps both. UPDATEorDELETEwithoutWHEREaffects every row.DROP TABLEremoves the table and its data;TRUNCATE TABLEempties it but keeps the structure;DELETEremoves chosen rows and can be rolled back inside a transaction.
Database objects
| Object | What it is |
|---|---|
| Table | Stores the data |
| View | A saved SELECT presented as a virtual table; stores no data (unless indexed/materialized); simplifies queries and restricts which columns users see |
| Index | Extra structure that speeds up lookups on chosen columns; costs storage and slows writes slightly. A clustered index defines physical row order (one per table); non-clustered indexes are separate (many) |
| Stored procedure | Named, precompiled set of SQL statements run with EXEC; can take parameters, enforce logic, reduce network round trips, and limit direct table access |
| Function | Returns a value or table, used inside queries |
| Trigger | Code that runs automatically on insert, update or delete |
| Constraint | Rule such as primary key, foreign key, unique, check, not null, default |
Typical cues: “a saved query that behaves like a table” is a view; “improve read performance on a frequently filtered column” is an index; “reusable server-side logic called by applications” is a stored procedure.
Azure SQL family
All members run the SQL Server engine and use T-SQL. The trade-off is control versus management effort.
| Azure SQL Database | Azure SQL Managed Instance | SQL Server on Azure VM | |
|---|---|---|---|
| Service type | PaaS | PaaS | IaaS |
| Scope | Single database or elastic pool | Instance with multiple databases | Full SQL Server installation on a VM |
| SQL Server compatibility | High, some features missing | Near 100% (SQL Agent, cross-database queries, linked servers, CLR, Database Mail) | 100%, any version/edition |
| OS access | None | None | Full |
| Patching and backups | Microsoft | Microsoft | You (with options such as automated backup via the SQL IaaS extension) |
| Best for | New cloud-native apps, SaaS multi-tenant, minimal admin | Lift and shift of existing on-premises SQL Server with minimal change | Needs OS-level control, unsupported features, legacy versions, custom software on the same machine |
Azure SQL Database in more detail
- Deployment options: a single database (own resources), an elastic pool (databases share a resource pool; good for many databases with varying, unpredictable peaks), and Hyperscale (very large databases, fast scale and backup).
- Purchasing models: vCore (choose cores, memory, storage; General Purpose, Business Critical, Hyperscale tiers) and DTU (bundled measure of CPU, memory and I/O, tiers Basic, Standard, Premium).
- Serverless compute: auto-scales within a range and auto-pauses when idle, billing per second of use. Good for intermittent workloads.
- Built-in high availability with a financially backed SLA, automatic backups with point-in-time restore, geo-replication and failover groups for disaster recovery, Microsoft Entra ID authentication, Transparent Data Encryption by default, Advanced Threat Protection and auditing through Microsoft Defender for SQL.
Azure SQL Managed Instance in more detail
- Deployed into a virtual network, so it has a private IP and is isolated from the internet by default.
- Supports native backup/restore from
.bakfiles, which makes migration easy. - Tiers General Purpose and Business Critical; can be linked to an on-premises instance with the Managed Instance link for migration and DR.
SQL Server on Azure Virtual Machines
- You choose the VM size, OS, SQL version and edition, and manage patching (assisted by the SQL IaaS Agent extension).
- Pick it when you need OS-level access, features no PaaS option offers, or need to run other software beside SQL Server.
Quick chooser
| Scenario | Answer |
|---|---|
| New app, wants least administration | Azure SQL Database |
| Many small databases with different peak times, cost shared | Elastic pool |
| Rarely used dev/test database, pay only when used | Serverless Azure SQL Database |
| Migrate on-premises instance using SQL Agent and cross-database queries with minimal code change | SQL Managed Instance |
| Need to RDP into the server or run an old SQL Server version | SQL Server on Azure VM |
Other names: Azure SQL Edge has been retired. SQL database in Microsoft Fabric is an autonomous SQL database for app developers inside Fabric, built on the Azure SQL Database engine and automatically replicated to OneLake for analytics.
Open-source relational services
Azure offers fully managed PaaS versions of popular open-source databases, with patching, backups, high availability and scaling handled by Microsoft.
| Service | Engine | Notes |
|---|---|---|
| Azure Database for PostgreSQL (flexible server) | PostgreSQL | Rich extensions (PostGIS, pgvector), JSON support, zone-redundant HA, read replicas |
| Azure Database for MySQL (flexible server) | MySQL | Popular for LAMP/web apps, WordPress; HA and read replicas |
| Azure Database for MariaDB | MariaDB | Retired in 2025; MySQL is the migration target |
- Both use the flexible server deployment model; the older single server model has been retired.
- Choose these when the app already uses PostgreSQL or MySQL, wants open-source portability, or needs engine-specific extensions. Use the SQL family when the app needs T-SQL and SQL Server features.
- Scale-out (distributed) PostgreSQL options exist, but the exam expects Azure Database for PostgreSQL and Azure Database for MySQL.
Exam checklist
- Define table, row, column, primary key, foreign key and relationship types, and what a junction table does.
- Explain normalization: removes redundancy, uses more tables and joins; OLTP normalised, analytics denormalised.
- Read basic
SELECT,INSERT,UPDATE,DELETE,JOIN,GROUP BYandHAVING; know DDL versus DML versus DCL. - Define view, index, stored procedure, trigger and constraint by their purpose.
- Choose between Azure SQL Database, SQL Managed Instance and SQL Server on a VM, and say which are PaaS and which IaaS.
- Know elastic pools, serverless, vCore and DTU at a one-line level.
- Name the open-source services: Azure Database for PostgreSQL and for MySQL, both PaaS.