Skip to content

Role-Playing Dimensions

Sometimes, a single physical dimension table is joined to a fact table multiple times, with each join representing a different logical view of the dimension. These separate views (with unique attribute column names) are called "roles".

Example (Dates in an Order Fact Table):

Instead of creating three separate date tables for ordering, shipping and delivering, you use SQL aliases to join the exact same dim_date table three times.

order_idorder_date_keyship_date_keydelivery_date_key
9001202401012024010320240105
9002202401022024010220240106

Each foreign key represents a different role and references the appropriate row in the shared Conformed Date Dimension.

Overlapping Dimension Classifications

Dimension classifications are not necessarily mutually exclusive. A dimension can have multiple characteristics at the same time. For example, dim_date can be both a conformed dimension and a role-playing dimension.