Exams / DP-900 / D1 Describe core data concepts
D1.3
Describe common data workloads
- Describe features of transactional workloads
- Describe features of analytical workloads
Transactional (OLTP) vs. analytical (OLAP)
| OLTP (transactional) | OLAP (analytical) | |
|---|---|---|
| Purpose | Record business events as they happen (orders, payments, transfers) | Analyze historical data for trends, reporting, decisions |
| Read/write mix | Heavy writes, moderate reads | Heavy reads, low/no writes |
| Schema | Enforced on write (predefined relational schema) | Often pre-aggregated, star/snowflake schema instead of strict normalization |
| Data shape | Normalized: broken into many small, non-redundant tables | Denormalized / dimensional, commonly pre-aggregated |
| History | Keeps only a working window of current data | Preserves large volumes of historical data for time-series analysis |
| Examples | E-commerce checkout, banking transfers, point-of-sale (POS) | Paginated reports over a data warehouse, dashboards, self-service exploration |
- OLTP systems normalize data to reduce redundancy, which keeps individual transactions fast and independent — but makes ad-hoc business reporting harder without a DBA, which is exactly why data is later moved into an OLAP/warehouse model.
- OLAP data is commonly pre-aggregated (cubes, tabular semantic models), which is what makes complex multi-dimension queries fast — not simply because it is read-only.
- Reading from or querying a data warehouse (QA app, paginated report, dashboard) is always OLAP, no matter which team or purpose consumes it.
- An application that both reads and writes individual operational records (e-commerce, banking, POS) is always OLTP.
ACID (transactional guarantees)
| Property | Guarantees | What breaks it |
|---|---|---|
| Atomicity | A transaction executes exactly once: all of its operations succeed and commit, or none do (full rollback) | Only the debit, or only the credit, is applied |
| Consistency | Every transaction moves the database from one valid state to another (constraints, rules preserved) | A transaction leaves the data in a state that violates its rules |
| Isolation | Concurrent transactions behave as if each were the only one running; no one observes partial effects | A reader sees Account A debited but Account B not yet credited |
| Durability | Once a transaction commits, its changes are permanent and recoverable, even through a later crash or OS restart | Committed data is lost after an outage |
- A frequent trap: "all changes are logged and accounted for" sounds like consistency but is really durability — consistency is about valid state transitions, not logging/persistence.
- Another trap: a reader seeing a mixed before/after state across two related records (e.g. one account already updated, the other not) is an isolation failure, not atomicity — atomicity is about whether the transaction itself fully commits or fully rolls back.
Exam traps
- "OLTP vs OLAP" multi-select questions reuse the same three OLTP traits worded differently: heavy writes/moderate reads, schema on write (= "schema defined in a database"), normalized data. The OLAP opposites are heavy reads/low writes, pre-aggregated/denormalized schema, and historical data retention.
- Don't confuse consistency (valid state: valid state) with durability (survives after commit) — the "logged and accounted for" and "survives an outage/restart" phrasings both describe durability.
- Don't confuse isolation (hiding a transaction's partial, in-flight effects from others) with atomicity (the transaction itself completing fully or not at all).
- A scenario naming two linked operations that must both succeed or both fail (debit + credit) is atomicity; a scenario about what a concurrent reader is allowed to see mid-transaction is isolation.
- Any wording about querying/reading a data warehouse or a dimensional model — whatever the business purpose (QA, paginated reports, dashboards) — is OLAP, not OLTP.