Skip to content
Back to challenges
Advanced Dimensional PatternsQuick Decisionbeginner5 min

Role-play or duplicate?

Choose multiple foreign keys to one date dimension over duplicate per-role date tables.

How this preview works
Preview this problem before signing in. Sign in to save progress and submit work.

Concept

role-playing-dimensions

The primary modeling idea this problem reinforces.

Requirements

1

Business needs the model must satisfy.

Scenario

An orders fact needs order date, ship date, and delivery date. One proposal builds three separate date dimensions; another keeps one date dimension with three foreign keys.

Why this matters

Duplicate per-role dimensions drift apart and break conformance. Role-playing (one dimension, multiple foreign keys) keeps the calendar consistent across every role.

Requirements
  • Pick the design that keeps one consistent calendar across all date roles.
What success looks like
  • The answer reuses one date dimension across the three roles.
  • The explanation connects single-dimension reuse to conformance.
Hints
  • One physical dimension, several foreign keys.
  • Three date tables means three calendars to keep in sync.
Common pitfalls
  • Building one date dimension per role and letting them drift.
  • Collapsing the three roles into one date and losing detail.
  • Storing raw dates instead of foreign keys.
Reference approaches
These are valid approaches, not one absolute answer.

Role-playing over duplicate date tables

Keep one date dimension and add order_date, ship_date, and delivery_date foreign keys on the orders fact rather than building three separate date dimensions. A Kimball role-playing dimension.

Optimizes for

  • Calendar consistency
  • Lower maintenance
  • Cross-role comparability

Trade-offs

  • Queries alias the dimension per role

Try the question first.

The discussion has other people's approaches and solutions. Give it a real attempt before you read them.