↑ ↓ to move, Enter to open, Esc to close

    DP-900Azure Data Fundamentals

    Switch exam

    Microsoft Azure

    aws Amazon Web Services

    Google Cloud

    ServiceNow

    Databricks

    Cisco

    Salesforce

    All exams and search
    Free exam

    Exams / DP-900 / D2 Identify considerations for relational data on Azure

    D2.1

    Describe relational concepts

    • 5 min read
    • 6 sections
    • 48 questions
    • 20–25% of the exam
    • Identify features of relational data
    • Describe normalization and why it is used
    • Identify common structured query language (SQL) statements
    • Identify common database objects

    What makes data "relational"

    A relational database organizes data into tables (relations): data is logically organized in a row-and-column format similar to a spreadsheet, under a schema that is fixed before any data is written (schema-on-write). Every row in a table has the same columns, even though the values differ row to row.

    Trait Relational database
    Schema Defined before data is written, enforced
    Consistency Strong, ACID transactions
    Access SQL (or a SQL dialect)
    Best suited for Structured data, high-volume transactional writes, strong consistency requirements

    Non-relational (key/value, document, graph) stores trade some of this away — for example, most key-value stores only support simple query, insert, and delete operations — in exchange for a flexible schema or massive horizontal scale. A relational database is the right choice specifically when strong consistency guarantees are required.

    Database objects

    Object What it is
    Table Database objects that contain all the data in a database — rows and columns
    View A virtual table whose contents are defined by a query
    Index A structure built on one or more columns that speeds up data retrieval
    Stored procedure A group of one or more Transact-SQL statements (or a CLR method) stored and executed by the database engine

    A view doesn't store its own data: it re-runs its underlying query (which can join tables and include calculated columns) every time it's selected from, which is exactly why it's useful for letting several users rerun the same complex query without repeating it.

    Clustered vs. nonclustered indexes

    Clustered indexes sort and store the data rows in the table or view based on their key values — the index is the physical row order, so a table can have only one. A nonclustered index keeps a separate structure of key values with pointers back to the data rows, without reordering the table itself, so a table can have many nonclustered indexes. An indexed column referenced in a WHERE predicate lets the query optimizer seek directly to matching rows instead of scanning the whole table.

    WHERE col = valueIndexed column?Index seek: go straight tomatching rowsFull table scan: read every rowClustered index(sorts & stores the rows)Nonclustered index(separate key + row pointer)YesNo

    Keys and relationships

    • A primary key is a column, or combination of columns, whose values uniquely identify every row in a table.
    • Relational databases represent relationships using foreign keys: a foreign key in one table references the primary key of another table, linking the two entities.

    When modeling an entity for a relational database: its attributes map to table columns, and each entity maps to its own table; a foreign key is what links two related entities/tables together.

    SQL statement categories

    Category Purpose Example statements
    DDL (Data Definition Language) Create, alter, or drop data structures in a database CREATE, ALTER, DROP
    DML (Data Manipulation Language) Insert, update, and change the rows in a database (and read them) SELECT, INSERT, UPDATE, DELETE
    DCL (Data Control Language) Determine which users and logins can access data and perform operations GRANT, REVOKE, DENY

    A frequent exam trap: DROP removes the whole object (DDL), while DELETE only removes rows from it (DML).

    Common T-SQL clauses

    • SELECT — use the SELECT statement to retrieve rows from the database; it chooses the columns/expressions to project.
    • JOIN ... ON — a joined table is a result set that is the product of two or more tables; the ON clause supplies the matching condition (e.g., ON o.Customer = c.ID).
    • WHERE — defines the condition to be met for the rows to be returned (or affected, in UPDATE/DELETE); this is the predicate that lets the optimizer use an index.
    • GROUP BY — a SELECT clause that divides the query result into groups of rows, usually to compute one or more aggregations per group.
    • Aggregate functions (MAX, MIN, SUM, AVG, COUNT, ...) — each performs a calculation on a set of values and returns a single value per group.
    SELECT SalesDate, AVG(SalesAmount)
    FROM Sales
    GROUP BY SalesDate
    ORDER BY SalesDate;
    

    INSERT INTO <table> (<columns>) VALUES (<values>) — the identifier right after INSERT INTO is the target table; the parenthesized list that follows it names the table's columns.

    Normalization

    Normalization is the schema-design process that reduces data duplication and helps ensure data integrity: the goal of efficiently processing and storing individual transactions by an OLTP system is partly accomplished through data normalization, which breaks up the data into smaller, less redundant chunks. It structures — never eliminates — relationships between tables, expressing them through keys.

    Fully normalized Fully denormalized
    One entity's data lives in Multiple related tables A single table
    Reading one entity Requires joins across tables No joins needed
    Writing one entity Can require coordinated writes to multiple tables Writes to a single table
    Favored by OLTP (transactional) systems OLAP/analytics (dimensional) systems

    When you conduct analytics and reporting on data that's highly normalized, the queries tend to be complex, because most queries need to denormalize the data by using joins — which is why analytical systems commonly favor more denormalized, dimensional models than transactional systems do.

    Entity: Customer orderNormalized: Customers table +Orders table + OrderLines tableDenormalized: one wide Orderstable with customer + line datarepeatedJOIN across tablesWrite to the one table that ownseach factSingle-table read, no joinSingle-table write, values mayrepeatreadwritereadwrite

    Exam traps

    • DDL vs. DML vs. DCL — CREATE/ALTER/DROP define structures (DDL); SELECT/INSERT/UPDATE/DELETE touch row data (DML); GRANT/REVOKE/DENY manage permissions (DCL). MERGE is DML (it inserts/updates/deletes rows), not DDL.
    • View vs. table vs. index vs. stored procedure — only a table physically holds data; a view is query-defined; an index only speeds up retrieval; a stored procedure runs code. Don't let a question about "what holds the data" land on a view or an index.
    • Clustered vs. nonclustered index — only a clustered index reorders a table's physical storage (one per table); a nonclustered index is a separate lookup structure.
    • WHERE lets the optimizer use an index — SELECT alone or JOIN alone don't supply a filtering predicate; it's the WHERE (or ON) condition on an indexed column that enables an index seek instead of a full scan.
    • Normalized ≠ "no relationships" — normalization structures relationships with keys; it does not eliminate them. Expect "Yes/No" statement questions designed to catch this confusion.
    • Fully normalized vs. fully denormalized read/write pattern — normalized ⇒ reads/writes can span multiple tables; denormalized ⇒ reads/writes target a single table. These two question variants mirror each other.
    • Relational vs. key/value stores and joins — key/value stores are optimized for simple key lookups, not complex multi-table joins; that strength belongs to relational databases.

    Docs

    The rest of this chapter is part of the DP-900 premium course

    Unlock every chapter, all 323 questions and spaced review with All access or a 90-day exam pass. Every Fundamentals exam stays free, and the first chapter of every exam is open.

    Chapters