Skip to content
Back to challenges
Advanced Dimensional PatternsConcept Challengeintermediate25 min

Junk dimensions

Collect scattered boolean and low-cardinality flags into one compact junk dimension.

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

Concept

junk-dimensions

The primary modeling idea this problem reinforces.

Requirements

3

Business needs the model must satisfy.

Scenario

A sales fact has accumulated several low-cardinality flags (gift, promo, and sales channel) directly on the fact. Analysts want to filter and group by these flags, but the fact keeps widening as new flags appear.

Why this matters

A junk dimension collects unrelated low-cardinality flags into one small dimension. It keeps the fact narrow and gives flags a stable home instead of a column sprawl that grows with every new indicator.

Requirements
  • Create a junk dimension that holds the combinations of gift, promo, and channel flags.
  • Reference the junk dimension from the sales fact with a single surrogate foreign key.
  • Declare an N:1 relationship from the fact to the junk dimension.
Read-only starter workspace
Inspect the authored starting ERD, then open the workspace to edit and run the checks. Saving your progress needs a free account.

Template

Junk dimension starter

The model users start from in the full workspace.

Entities

2

Seeded tables visible in the public preview.

Dialect

postgresql

Generated SQL target for this starter model.

Mini Map

This preview is read-only. Open the workspace to edit and verify; saving needs a free account.

Open workspace

Try the question first.

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