Studierende stehen vor dem LC und blicken lächelnd einer Kollegin mit einer Mappe in der Hand nach.

Exercise No. 21: Soccer Goal (log)

This case is about scoring soccer goals.

We have four dimensions with the following hierarchical structure (the dimension "Player" features a parallel hierarchy at level 1):

Table L.E.33.1 - soccer goal

There is only one key figure in this example, "no. of goals". Each player has an additional attribute "P_pl_dob", the player's date of birth.

Please draw the Classic Star and the Fact Constellation Schema. Then draw the example's dimension tables partitioned and normalized and use them to build a Snowflake Schema!

Solution

The Star Schema for this case includes a central fact table and four dimension tables. Dimension "player" features a parallel hierarchy at level 1 ("soccer team" and "nationality"); The dimension tables consist of a generated key as well as a key and a text field for each hierarchy (except the total aggregation) and the level attribute. The fact table uses the generated keys from the dimension tables as a combined key and contains only one key figure ("no. of goals") in this example:

Figure L.E.33.1 - The Classic Star Schema

The Fact Constellation Schema for this case consists of four dimension tables and 15 fact tables (1x5x1x3):

Figure L.E.33.2 - The Fact Constellation Schema

Partitioning the Classic Star's dimension tables by the level attribute results in one table for each hierarchy level (in each dimension). All tables include the fields of the higher levels, the level attribute itself is omitted:

Figure L.E.33.3 - DT partitioned (left) and normalized (right)

Normalizing the dimension tables completely means that only the key of the next higher level is kept in each table. Please note that the tables for the total aggregation level have been neglected in Figure L.E.33.3

The Snowflake Schema is a combination of the Fact Constellation Schema's fact tables and the dimension tables either partitioned or normalized:

Figure L.E.33.4 - The Snowflake Schema

This exercise is part of a case study: dfm - apa - log