🔒 Guided

Pre-launch preview. Authorised access only.

Incorrect code

Guided by A Guide to Cloud
Explore AB-900 AI-901
Guided DP-900 Domain 2
Domain 2 — Module 4 of 7 57%
11 of 27 overall

DP-900 Study Guide

Domain 1: Core Data Concepts

  • Your First Look at Data Free
  • Data File Formats: CSV, JSON, Parquet & More Free
  • Databases: Relational vs Non-Relational Free
  • Transactional Workloads: Keeping Data Consistent Free
  • Analytical Workloads: Finding the Insights Free
  • Data Roles: DBA, Engineer & Analyst Free
  • The Azure Data Landscape Free

Domain 2: Relational Data on Azure

  • Relational Data: Tables, Keys & Relationships
  • Normalization: Why Duplicate Data is Bad
  • SQL Basics: SELECT, INSERT, UPDATE, DELETE
  • Database Objects: Views, Indexes & More
  • Azure SQL: Your Database in the Cloud
  • Open-Source Databases on Azure
  • Choosing the Right Azure Database

Domain 3: Non-Relational Data on Azure

  • Azure Blob Storage: Files in the Cloud
  • Azure Files & Table Storage
  • Azure Cosmos DB: The Global Database
  • Cosmos DB APIs: SQL, MongoDB & More
  • Choosing Non-Relational Storage

Domain 4: Analytics on Azure

  • Data Ingestion & Processing
  • Analytical Data Stores: Data Lakes, Warehouses & Lakehouses
  • Microsoft Fabric & Azure Databricks
  • Batch vs Streaming: Two Speeds of Data
  • Real-Time Analytics on Azure
  • Power BI: See Your Data
  • Data Models in Power BI
  • Choosing the Right Visualization

DP-900 Study Guide

Domain 1: Core Data Concepts

  • Your First Look at Data Free
  • Data File Formats: CSV, JSON, Parquet & More Free
  • Databases: Relational vs Non-Relational Free
  • Transactional Workloads: Keeping Data Consistent Free
  • Analytical Workloads: Finding the Insights Free
  • Data Roles: DBA, Engineer & Analyst Free
  • The Azure Data Landscape Free

Domain 2: Relational Data on Azure

  • Relational Data: Tables, Keys & Relationships
  • Normalization: Why Duplicate Data is Bad
  • SQL Basics: SELECT, INSERT, UPDATE, DELETE
  • Database Objects: Views, Indexes & More
  • Azure SQL: Your Database in the Cloud
  • Open-Source Databases on Azure
  • Choosing the Right Azure Database

Domain 3: Non-Relational Data on Azure

  • Azure Blob Storage: Files in the Cloud
  • Azure Files & Table Storage
  • Azure Cosmos DB: The Global Database
  • Cosmos DB APIs: SQL, MongoDB & More
  • Choosing Non-Relational Storage

Domain 4: Analytics on Azure

  • Data Ingestion & Processing
  • Analytical Data Stores: Data Lakes, Warehouses & Lakehouses
  • Microsoft Fabric & Azure Databricks
  • Batch vs Streaming: Two Speeds of Data
  • Real-Time Analytics on Azure
  • Power BI: See Your Data
  • Data Models in Power BI
  • Choosing the Right Visualization
Domain 2: Relational Data on Azure Premium ⏱ ~10 min read

Database Objects: Views, Indexes & More

Tables are just the beginning. Relational databases contain views, indexes, stored procedures, and more — each serving a specific purpose.

Beyond tables

☕ Simple explanation

A database isn’t just tables. It has extra objects that make it faster, safer, and easier to use.

Think of a library: the books are the data (tables). But the library also has a catalogue (index) for finding books quickly, a reading list (view) that shows a curated selection, and standard procedures (stored procedures) that librarians follow for common tasks.

These extra objects don’t store new data — they help you work with existing data more effectively.

Relational databases support several object types beyond tables. These include views (virtual tables defined by queries), indexes (structures that speed up data retrieval), stored procedures (precompiled SQL routines), and functions (reusable calculations). Understanding these objects is essential for the DP-900 exam’s “identify common database objects” objective.

Common database objects

Views

A view is a saved SQL query that acts like a virtual table. It doesn’t store data — it runs the query every time you access it.

-- Create a view showing active drivers with their delivery count
CREATE VIEW ActiveDriverSummary AS
SELECT d.Name, d.LicenceClass, COUNT(del.DeliveryID) AS TotalDeliveries
FROM Drivers d
JOIN Deliveries del ON d.DriverID = del.DriverID
WHERE d.IsActive = 1
GROUP BY d.Name, d.LicenceClass;

-- Use the view like a table
SELECT * FROM ActiveDriverSummary;

Why use views?

  • Simplify complex queries — write the join once, reuse it as a simple table name
  • Security — show users specific columns without exposing the full table
  • Consistency — everyone uses the same query logic

Indexes

An index is a data structure that speeds up data retrieval — like the index at the back of a textbook. Instead of reading every page to find a topic, you look it up in the index and go directly to the right page.

-- Create an index on the Deliveries table for faster date lookups
CREATE INDEX idx_delivery_date ON Deliveries (Date);

Key points:

  • Indexes speed up SELECT queries dramatically
  • They slow down INSERT/UPDATE/DELETE slightly (the index must be updated too)
  • The database automatically creates an index on the primary key
  • Add indexes on columns frequently used in WHERE and JOIN clauses

Stored procedures

A stored procedure is a saved block of SQL that you can call by name. Think of it as a reusable function.

-- Create a stored procedure
CREATE PROCEDURE AssignDriver
  @DeliveryID VARCHAR(10),
  @DriverID VARCHAR(10)
AS
BEGIN
  UPDATE Deliveries SET DriverID = @DriverID WHERE DeliveryID = @DeliveryID;
  UPDATE Drivers SET IsActive = 0 WHERE DriverID = @DriverID;
END;

-- Call it
EXEC AssignDriver @DeliveryID = 'DEL-504', @DriverID = 'D001';

Why use stored procedures?

  • Encapsulate logic — complex operations in one callable unit
  • Performance — precompiled and optimised by the database
  • Security — users can run the procedure without direct table access
  • Consistency — the same business logic every time

Functions

Functions are similar to stored procedures but return a value. They can be used inside SQL queries.

  • Scalar functions — return a single value
  • Table-valued functions — return a result set (like a view with parameters)
Views vs indexes vs stored procedures
FeatureViewIndexStored Procedure
What it isA saved query (virtual table)A lookup structure for fast searchesA saved block of SQL logic
Stores data?No — runs the query each timeYes — a copy of indexed columnsNo — stores code, not data
Main benefitSimplify and secure queriesSpeed up data retrievalEncapsulate reusable logic
Example useShow active drivers with statsFind deliveries by date fasterAssign a driver to a delivery
💡 Exam tip: object identification

The exam describes a scenario and asks which database object to use:

  • “Speed up queries that filter by date” → Index
  • “Give analysts a simplified table without exposing raw data” → View
  • “Automate a multi-step business process in the database” → Stored procedure
  • “Reuse a calculation across multiple queries” → Function

Flashcards

Question

What is a database view?

Click or press Enter to reveal answer

Answer

A saved SQL query that acts like a virtual table. It doesn't store data — it runs the underlying query each time you access it. Used for simplification, security, and consistency.

Click to flip back

Question

What does a database index do?

Click or press Enter to reveal answer

Answer

An index speeds up data retrieval by creating a lookup structure on one or more columns — like a book index. It makes SELECT queries faster but adds slight overhead to INSERT/UPDATE/DELETE operations.

Click to flip back

Question

What is a stored procedure?

Click or press Enter to reveal answer

Answer

A precompiled, saved block of SQL that can be called by name. Used to encapsulate complex logic, improve performance, enforce security, and ensure consistent business operations.

Click to flip back

Knowledge check

Knowledge Check

Jake's CloudPulse database has a query that joins 5 tables to show customer usage reports. Multiple team members need to run this query daily. What should Jake create?

Knowledge Check

Tom's Deliveries table has 2 million rows. Queries that filter by delivery date are taking 15 seconds. What should the DBA create to improve performance?

🎬 Video coming soon

Next up: Azure SQL: Your Database in the Cloud — let’s move from database concepts to real Azure services.

← Previous

SQL Basics: SELECT, INSERT, UPDATE, DELETE

Next →

Azure SQL: Your Database in the Cloud

Guided

I learn, I simplify, I share.

A Guide to Cloud YouTube Feedback

© 2026 Sutheesh. All rights reserved.

Guided is an independent study resource and is not affiliated with, endorsed by, or officially connected to Microsoft. Microsoft, Azure, and related trademarks are property of Microsoft Corporation. Always verify information against Microsoft Learn.