Analytics · Intermediate

Data Modeling and Dimensional Design

Design the tables a business reports from. Kimball-style dimensional modelling built end to end on PostgreSQL 16, from a real order system to a warehouse whose numbers reconcile.

About this course

ULC-002 leaves you able to query any schema. This course teaches you to design one — specifically, the kind of schema a business reports from, which is not the kind of schema a business runs on. You work on **PostgreSQL 16** on your own lab machine, with `ultishop` — the synthetic online-retail database from ULC-002 — as your source system. It has everything a real source system has: free-text statuses that arrive in sixteen spellings, eight orders dated 1970 and 2099, customers with no region, and no history at all. Over ten lessons you turn it into a warehouse: a landing area, a fiscal-aware calendar, a Type 2 customer dimension that remembers where somebody used to live, transaction, periodic-snapshot and accumulating-snapshot fact tables, junk and factless facts, foreign keys, indexes, monthly partitioning and a materialised aggregate that reconciles to the fact it came from. Two lessons put you in front of a problem rather than an exercise. A slowly-changing-dimension load finishes half way and leaves forty customers with two current rows; you find it from the data, repair it, and then add the constraint that makes it impossible. An order feed arrives before the customer feed; you diagnose two different causes in one symptom and fix only the one that is broken. A third has you review a model somebody else delivered — one that loads, returns numbers, and reports seven times the revenue it holds — against a written checklist, and decide whether to accept it. The working practice is the same as the modelling. Every schema change goes through a written change record with a rollback that has been executed. Every load is proved idempotent by running it twice. Every derived table is reconciled to its source, with its scope stated. Every command and every number in these lessons was executed on PostgreSQL 16.15 and the output you see is the output that was observed. The final project is an engagement: a subscription-box retailer with six feeds, a finance team that wants month-end positions and a marketing team that wants order-line detail attributed to the plan a customer was on at the time. You deliver the design, the model, the documentation and a handover, graded by automated checks against the model and a rubric against your reasoning.

Content time
12 h 30 min
Lessons
10
Lab
Yes
provisioned for you
Certificate
Yes
on completion
Choose a career path

Lesson 1 is free. Enroll in a career path to access its full courses.

Lesson 1 is a free preview — read it without an account.

Analytics — the kind of infrastructure this course is practised on

Outline

Lessons

10 lessons · 12 h 30 min
  1. Lesson 1: Models for transactions, and models for questionsFree preview

    Why the database that runs a business is the wrong shape for reporting on it, and how to read a source system before you redesign anything.

    55 min
  2. Lesson 2: The dimensional model and the four-step process

    Facts, dimensions and grain, star against snowflake, and the four steps that turn a business process into a table.

    1 h
  3. Lesson 3: Dimension design

    Surrogate keys, the unknown member, a fiscal-aware calendar, role-playing views and the junk dimension that absorbs a source system's free text.

    1 h 15 min
  4. Lesson 4: Slowly changing dimensions

    Type 1, 2 and 3, effective dating and current flags, MERGE on PostgreSQL 16, and repairing a load that wrote history without closing it.

    1 h 25 min
  5. Lesson 5: Fact tables and measures

    Transaction, periodic snapshot and accumulating snapshot facts; additive, semi-additive and non-additive measures; and the surrogate-key lookup that never drops a row.

    1 h 30 min
  6. Lesson 6: Grain, integrity and awkward arrivals

    Foreign keys on a star, factless facts, and what to do when the order feed arrives before the customer feed.

    1 h 20 min
  7. Lesson 7: The bus matrix and conformed dimensions

    How a second star gets built without becoming a second warehouse: the enterprise bus matrix, conformance, drilling across, and naming standards that hold.

    1 h 5 min
  8. Lesson 8: Source-to-target mapping and load order

    Adding a business process to a live warehouse: the mapping document, the change record with a rollback that was tested, dimensions before facts, and an idempotent MERGE.

    1 h 15 min
  9. Lesson 9: Physical design on PostgreSQL

    Types, foreign-key indexes, BRIN, declarative range partitioning and materialised aggregates — each one measured with EXPLAIN rather than assumed.

    1 h 20 min
  10. Lesson 10: Documenting and reviewing a model

    A data dictionary that cannot drift, measurable documentation coverage, and a review of somebody else's model against a written checklist.

    1 h 25 min

Hands-on

Your lab

Real virtual machines on the Ultiblob cluster, reached from your browser. You administer them; we provision and destroy them.

  1. vm-01db01linux

Provisioned for you when you launch the lab from the course. The machines are yours for the access window; release them and launch again whenever you like.

Where it leads

Part of these career paths