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

Exercise No. 20: Freight Bookings (log)

We will now build a logical model for the "freight bookings" case.

We have four dimensions with the following hierarchical structure:

Table L.E.28.1 - freight bookings

"Costs" is the only key figure in this example. Each customer has an additional attribute "C_cu_add", the customer's address, each branch of a forwarding agent has an additional attribute "E_bf_add", the branch's address and each freight has an additional attribute "F_fr_des", the freight's description.

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

Solution

This case's Classic Star Schema has five tables, a central fact table and four dimension tables. The latter 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 a key figure ("costs") in this example:

Figure L.E.28.1 - The Classic Star Schema

The Fact Constellation Schema for this case consists of four dimension tables and 36 fact tables (2x3x2x3):

Figure L.E.28.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.28.3 - DT partitioned

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

Figure L.E.28.4 - The Snowflake Schema

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