← The engineer's eye

The engineer's eye

Star schemas, taken literally

Kimball named the star schema after a drawing: one fact table in the middle, its dimensions around it. Draw a whole Gold layer that way and the stars start to overlap, because the good dimensions are shared. That overlap is the point of the model, and it is easier to feel in a sky than in a diagram tool.

The Gold layer of : constellations, dimension stars

Each fact is the bright star of its constellation; lines run to the dimensions it joins. A star shared by several constellations is a conformed dimension, and the layout puts it between the facts that use it. Magnitude is log row count. The halo grows with the nights this year the table had a test warn or fail. Faint field stars are the Bronze and Silver tables, sitting beside what they feed. Hover for detail; click a star to light up everything that conforms to it.

The same sky, as a bus matrix

Here is the boring version. Facts down the side, dimensions across the top, a dot where a fact joins a dimension, both sorted by how much they are shared. It holds exactly the same information as the sky. Ask "which facts share dim_customer?" and the matrix answers in one glance down a column; the sky makes you trace five lines and count. The matrix is the tool. The sky is the thing you show a steering committee so they understand why a conformed customer dimension is worth a quarter of work.

Kimball bus matrix

Totals: dimensions per fact on the right, facts per dimension below. Hover a dot for the join column and the source column it plays. Click a row or column to select it in the sky.

Notes