Two-Column Table Methodology

Context: FIT3003_MOC Β· the correctness check applied to a drafted Star Schema before Building Dimension Tables and Building Fact Tables

Quick Revision

  • 🎯 Objective: imagine one two-column table per dimension β€” category fact measure βž” if every such table makes sense, the star may be drawn.
  • ⚑ Key Constraint: with multiple measures , all must exist in all tables β€” one dimension that cannot carry one measure invalidates the whole star.

πŸ“ Core

  • Column 1 = category βž” a candidate dimension ; each row is one member of it.
  • Column 2 = fact βž” the statistical numerical figure viewed from that category; the table is imaginary, never built.
  • One Fact Measure βž” draw one table per dimension; all four sensible ⟹ with dimensions is valid. (e.g. Num_of_Immigrants viewed by Year, Country, VisaType, SettlingState.)
  • Multiple Fact Measure βž” column 2 widens to ; the test is that every category table can display every measure. (e.g. Num_of_Employees and Total_Salary viewed by JobTitle, Month, EmploymentType, Gender.)
  • Failure verdict βž” if carries only , then is not viewable from every dimension, so a single star over with all three measures cannot be drawn β€” split the measure out or drop the dimension.

The grounding check β€” run it alongside the two-column tables

  • What does one cube row look like? βž” write four or five literal rows (Q1-2020 | Nike Shoes | Chadstone | $150,750); a row you cannot write is a grain you have not decided.
  • Where does the data come from? βž” name the operational artefact (transaction receipts; doctor records) β€” if no source record carries the measure, the star is undeliverable.
  • Where is the aggregate? βž” state what one source record contributes (each receipt’s total is summed; each doctor contributes 1 to Number_of_Doctors) β€” a count measure is easy to miss because no source column holds it.
  • What can be queried? βž” read two real questions back off the draft (β€œtotal sales of Nike Shoes in Chadstone in Q1-2020”; β€œhow many female GPs with years’ experience”); a question the draft cannot answer means a missing dimension or attribute.

βš™οΈ Worked Failure β€” a measure that one dimension cannot carry

πŸ”Ή Sales with Total_Sales and Number_of_Reviews

⚠️ Common Mistakes

  • πŸ’‘ Testing only the dimensions you already like βž” the method is exhaustive by construction; one unchecked dimension is the one that fails.
  • πŸ’‘ Accepting a table whose column 2 is not numerical βž” a fact holds only numerical, aggregated values, so a descriptive column 2 means the β€œmeasure” is really a dimension attribute.
  • πŸ’‘ Reading β€œirrelevant” as β€œzero” βž” zero reviews at Chadstone is a claim about data; irrelevance is a claim about the model, and only the second one invalidates the star.

🧠 Active Recall