Describe Core Data Concepts · Topic 3 of 4

Transactional and Analytical Workloads

DP-900 data workloads: transactional OLTP and analytical OLAP compared, the ACID properties, data warehouses, fact and dimension tables, and ETL steps.

  • 5 min
In a nutshell
  • OLTP means many small transactions, protected by ACID.
  • OLAP means large reads and aggregation over historical data.
  • A fact table holds measures. A dimension table holds descriptions.

What it is

A workload is the kind of work a system does with data. There are two main kinds. A transactional workload records business events as they happen. An analytical workload studies large amounts of past data to find patterns.

They need different designs, which is why most organisations run both on separate systems.

Transactionalrecord each eventETLcopy and reshapeAnalyticalstudy the history

How it works

Transactional workloads (OLTP)

Online transaction processing handles many small, quick operations: placing an order, transferring money, booking a seat. Each operation reads or writes a few rows and must be correct at once.

A transaction is a group of operations treated as one unit. Moving 100 dollars between accounts is a debit and a credit, and both must happen or neither. Transactional databases guarantee this with four properties known as ACID.

PropertyMeaning
AtomicityThe whole transaction completes, or none of it does
ConsistencyThe data always satisfies the defined rules after the transaction
IsolationConcurrent transactions do not see each other's partial changes
DurabilityOnce committed, the changes survive a failure

OLTP data is usually normalised, which means split into related tables to avoid duplication.

Analytical workloads (OLAP)

Online analytical processing reads large volumes of data and summarises it: total sales by region over five years, or the trend in customer sign ups. It rarely changes the data, and a single query may scan millions of rows.

Analytical data usually sits in a data warehouse, a central store of cleaned data collected from many source systems. Warehouse data is often arranged as a star schema.

  • A fact table holds numeric measures of events, such as sales amount and quantity.
  • Dimension tables hold descriptions used to slice the facts, such as customer, product and date.

Comparing the two

Transactional (OLTP)Analytical (OLAP)
PurposeRun the businessUnderstand the business
OperationsMany small reads and writesFewer, large reads
DataCurrent, detailedHistorical, summarised
DesignNormalised tablesStar schema, often denormalised
ExampleOrder entry systemSales trend dashboard

Getting data from one to the other

Analytical systems are fed by a pipeline. The classic order is ETL: extract data from the sources, transform it by cleaning and reshaping, then load it into the warehouse. A variation, ELT, loads the raw data first and transforms it inside the analytical store.

A worked scenario

A retailer's tills write every sale to an order database within milliseconds, and each sale must be exact: that is OLTP. Every night the day's sales are copied into a warehouse, joined with product and store descriptions, and cleaned. Managers then open a dashboard that compares this quarter with the last five: that is OLAP. Running the dashboard on the tills' database would slow down every sale, which is the reason the two are kept apart.

A transfer written as a transaction

The statements below move 100 from one account to another. They are grouped so that both happen or neither does.

BEGIN TRANSACTION;
UPDATE Accounts SET Balance = Balance - 100 WHERE AccountID = 1;
UPDATE Accounts SET Balance = Balance + 100 WHERE AccountID = 2;
COMMIT;

If the second update fails, the database issues a ROLLBACK, which undoes the first. Atomicity makes the pair indivisible, and durability makes the committed result permanent.

A small star schema

TableKindColumns
SalesFactDateKey, ProductKey, StoreKey, Quantity, Amount
DateDimensionDateKey, Day, Month, Quarter, Year
ProductDimensionProductKey, Name, Category, Brand
StoreDimensionStoreKey, City, Region

A question such as "revenue by product category per quarter" joins the fact table to two dimensions and adds up the Amount column. Because the dimensions are wide and flat, the query needs few joins and runs quickly.

Why the two workloads are kept apart

Transactional systems value speed for single records and strict accuracy, so they avoid long scans. Analytical queries scan millions of rows and could lock or slow the tables that the business depends on. Copying data into a separate warehouse protects the live system and also lets you combine many sources, such as sales, web visits and support tickets, into one view.

What to remember for the exam

  • OLTP means many small transactions, protected by ACID.
  • OLAP means large reads and aggregation over historical data.
  • A fact table holds measures. A dimension table holds descriptions.
  • A data warehouse is built from cleaned data from many sources.
  • ETL is extract, transform, load. ELT loads before it transforms.
Exam tip

If the scenario says "record", "book", "transfer" or "update", think OLTP. If it says "trend", "summarise", "report" or "over the last five years", think OLAP.

How the exam asks about this

  • "Guarantee that a transfer either fully completes or not at all." Atomicity.
  • "Changes survive a power failure after commit." Durability.
  • "Which table holds sales amounts?" The fact table.
  • "Large scale reporting over several years." An analytical workload.

Common mistakes

Mixing up consistency and isolation. Consistency keeps data valid against the rules. Isolation keeps transactions from seeing each other's unfinished work.

Calling a data lake a data warehouse. A warehouse holds structured, cleaned data. A lake holds raw files of any kind.

Running heavy reports on the live transaction database. It slows the business. Analytics normally uses a copy.

Assuming analytical data must be normalised. Warehouses often denormalise on purpose, so queries need fewer joins.

Check yourself

  • Which ACID property means a transaction completes fully or not at all?

    Atomicity.

  • What does a fact table hold?

    Numeric measures of business events, such as sales amounts.

  • What are the three steps of ETL?

    Extract, transform and load.

Topic 3 of 4 in Describe Core Data Concepts

Test yourself on Describe Core Data Concepts

The full Microsoft DP-900 question bank has 503 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by Microsoft. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.