One-Attribute Dimensions

Context: FIT3003_MOC · a design refinement applied after Building Dimension Tables · feedback-session material answering “why keep a dimension that stores nothing”

Quick Revision

  • 🎯 Objective: a dimension whose only column is its own ID carries no description to look up âž” querying the fact never needs to join it, so it is a candidate for absorption.
  • ⚠️ Key Constraint: absorbing it is a choice, not a rule — in practice most dimensions grow extra attributes, and the four treatments differ in what they cost when that happens.

📝 Core

  • What a dimension’s extra attributes are for âž” to describe the member, so a query can filter and label on CourseName rather than on CourseCode âž” Building Dimension Tables.
  • No extras âźą no join âž” the fact already stores the key value, and the dimension holds nothing else, so select … from Fact answers the question outright.
  • Treatment 1 — move it to the fact, column-based âž” the attribute’s values become separate measure columns (Total_Gold, Total_Silver, Total_Bronze); the attribute itself disappears and the fact widens.
  • Treatment 2 — move it to the fact, row-based âž” the attribute stays as a key column with one fact row per value; Medal Type in the fact is then a dimension-less key — no master file lists its valid values, so nothing validates a typo.
  • Treatment 3 — combine all one-attribute dimensions âž” several thin dimensions merge into one wider lookup table.
  • Treatment 4 — combine with a normal dimension âž” the lone attribute is absorbed into a related dimension that already carries descriptive columns.
  • Doing nothing is legitimate âž” the Chapter 2 College star keeps CountryDIM and YearDIM as single-column tables so the star’s axes stay explicit âž” Star Schema.

⚠️ Common Mistakes

  • đź’ˇ Joining a one-attribute dimension “for completeness” âž” costs a join and returns the column the fact already had.
  • đź’ˇ Choosing the row-based treatment and forgetting validation âž” a dimension-less key has no master list, so an unseen value enters the fact unchallenged and silently splits an aggregate in two.
  • đź’ˇ Deleting the dimension from the diagram as well as the schema âž” the star must still show which perspectives the fact supports; an absorbed attribute is drawn inside the fact, not omitted.

đź§  Active Recall