The DP-900 exam tests your understanding of how relational databases work and which Azure SQL service to use in different situations. This guide explains everything from the basics of tables to SQL syntax and Azure's database products — no developer background required.
What Is Relational Data?
Think of an address book. Each person gets one row, and each column holds a specific piece of information — name, phone number, city. That is essentially a relational database table. Data is organized into rows and columns with a fixed structure, and multiple tables can be linked together to represent complex real-world relationships efficiently.
| Concept | Description | Everyday Analogy | |---------|-------------|-----------------| | Table | Stores data in rows and columns | One sheet in a spreadsheet | | Row | A single data record | One person in the address book | | Column | An attribute of the data | The "phone number" column | | Schema | The structure definition of a table | The column names and data type rules |
Keys — Linking Tables Together
Primary Key
Imagine a school student ID number. Even if two students share the same name, their student ID is always unique. A primary key works the same way — it uniquely identifies every row in a table. It cannot be duplicated and cannot be empty (NULL).
For example, if customer_id is the primary key in a customers table, then customer_id = 1001 refers to exactly one customer, no ambiguity.
Foreign Key
Now imagine an orders table. Each order needs to record which customer placed it. Instead of copying all the customer's details into every order row, you simply store the customer_id as a reference. That reference is the foreign key.
Foreign keys prevent data duplication and ensure consistency — if a customer's phone number changes, you only update it in one place (the customers table). The orders table just holds the reference ID.
| Key Type | Role | Property | |----------|------|----------| | Primary Key | Uniquely identifies each row | No duplicates, no NULL | | Foreign Key | References the primary key of another table | Ensures referential integrity |
!Primary Key versus Foreign Key
Normalization — Eliminating Duplicate Data
Why is duplicate data a problem? Imagine storing a customer's phone number in every row of an orders table. If that number changes, you need to update every single order row for that customer — and if you miss even one, the data becomes inconsistent.
Normalization solves this by organizing data to minimize redundancy. Customer information lives in one place (the customers table), and the orders table simply references it. One change in the customers table automatically applies everywhere.
Key goals of normalization: Minimize data duplication Prevent data inconsistency Avoid update and delete anomalies
Basic SQL Syntax
SQL (Structured Query Language) is the language you use to communicate with a relational database. It reads almost like plain English, so even beginners can understand what a statement is doing.
SELECT reads data from a table. INSERT adds a new row. UPDATE modifies existing rows — always use WHERE or you will change every row in the table. DELETE removes rows — again, always use WHERE or you will erase the entire table. JOIN combines data from two tables using a shared key, letting you answer questions like "who ordered what."
| SQL Statement | What It Does | Analogy | |--------------|-------------|---------| | SELECT | Read / retrieve data | Looking up a name in the address book | | INSERT | Add a new row | Adding a new person to the address book | | UPDATE | Modify an existing row | Correcting a phone number | | DELETE | Remove a row | Erasing an entry | | JOIN | Combine two tables | Merging a class list with a grade sheet |
Database Objects
A view is a saved query that looks like a table when you open it. Think of it as a saved filter — instead of running the same complex query every time, you give it a name and call it like a table. Views also help with security: you can show only certain columns without exposing the full table.
A stored procedure is a saved collection of SQL commands that you can run by name. Like a saved recipe, you write the instructions once and reuse them. This is useful for common business operations like placing an order or generating a monthly report.
An index is like the index at the back of a book — instead of reading every page to find a word, you jump straight to the right page. Indexes speed up SELECT queries dramatically. The trade-off is that INSERT, UPDATE, and DELETE operations become slightly slower because the index must also be updated.
Azure SQL Products — Which One to Use?
Microsoft offers several managed SQL services on Azure. They all use SQL, but differ in how much control — and responsibility — you have.
Azure SQL Database is the fully managed option. Azure handles patching, backups, and high availability. You just manage your data and queries. Best for new cloud-native apps or when you want minimal management overhead. It even offers a serverless option that pauses automatically when idle.
Azure SQL Managed Instance is for organizations migrating existing on-premises SQL Server databases to the cloud with minimal code changes. It supports the full SQL Server feature set, including SQL Server Agent and linked servers.
SQL Server on Azure VM gives you complete control. You install and manage SQL Server on a virtual machine yourself. Choose this when you need a specific SQL Server version, special configurations, or want to bring your own license (BYOL).
Azure Database for MySQL and PostgreSQL are fully managed open-source database services. Use them when your application is built on MySQL (WordPress, Laravel) or PostgreSQL (Django, PostGIS).
| Service | Management Level | Best For | |---------|-----------------|----------| | Azure SQL Database | Fully managed (PaaS) | New cloud apps, minimal admin | | SQL Managed Instance | Near-fully managed (PaaS) | Migrating on-prem SQL Server | | SQL Server on VM | Self-managed (IaaS) | Full control, special config, BYOL | | Azure DB for MySQL | Fully managed (PaaS) | MySQL-based applications | | Azure DB for PostgreSQL | Fully managed (PaaS) | PostgreSQL-based applications |
Exam Key Points
"rows and columns, fixed schema" -- relational database "uniquely identifies each row, no duplicates" -- primary key "references another table's primary key" -- foreign key "reduce duplication, prevent inconsistency" -- normalization "read data" -- SELECT / "add a new row" -- INSERT / "modify a row" -- UPDATE / "remove a row" -- DELETE "combine two tables using a shared key" -- JOIN "saved query that looks like a table" -- view "saved collection of SQL commands" -- stored procedure "speeds up SELECT, slightly slows writes" -- index "fully managed, best for new apps" -- Azure SQL Database "migrate on-prem SQL Server with full features" -- SQL Managed Instance "full control, BYOL" -- SQL Server on VM "open-source fully managed" -- Azure DB for MySQL / PostgreSQL