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

Exercise No. 56: An Accident (dfm)

In this simplified E/R schema a driver causes an accident - which can be categorised by type - in a certain area. This area belongs to a city district and the district is part of a city. Sometimes an emergency vehicle which can also be categorised by type is needed. The accident can be watched by a witness.. The time dimension consists of day and week.

Figure D.E.45.1 - an accident

Please identify the fact of interest and build the attribute tree. We only need a classification by district and city, neglecting the area of an accident. Some attributes cannot be used for aggregation in a meaningful way. Those should be tagged as non-dimension attributes in the fact schema.

Then derive the fact schema from the tree by defining dimensions, fact attributes and hierarchies and build a glossary for the fact attributes if there are any.

There is only one fact attribute "fault" which is a binary variable (parameter value 0 or 1, depending on whether the accident was the driver's fault or not) that may be aggregated using the "average" operator along all dimensions.

Solution

Entity CAUSES is chosen as the only fact. Its identifier becomes the root of the attribute tree. All other attributes or identifiers become nodes.

Figure D.E.45.2 - The attribute tree

Driver, emergency vehicle, accident, area and witness are defined as dimensions, dimension month is introduced as a range of the date attribute. As said before we are not interested in the area of an accident; therefore the information area is grafted which enables us to preserve its descendants district and city. Dimension witness and dimension emergency vehicle are tagged optional. There is only one fact attribute: fault. Attribute fault is non-additive along all dimensions.

The description of an accident and the address of a witness cannot be used for aggregation and are therefore tagged as a non-dimension attributes.

Figure D.E.45.3 - The fact schema

fault = AVG(CAUSES)

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