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

Exercise No. 24: Paperboy (dfm)

In this sim­pli­fied E/R sche­ma a cus­to­mer gets a news­pa­per by a pa­per­boy. The cus­to­mer lives in a cer­tain district which be­longs to a cer­tain city. The news­pa­per is pu­blished by a cer­tain pu­bli­shing house which can be­long to a media group. The time di­men­si­on con­sists of day, week and month.

Fi­gu­re D.E.50.1 - pa­per­boy

Plea­se iden­ti­fy the fact of in­te­rest and build the at­tri­bu­te tree. Some at­tri­bu­tes are not of in­te­rest for this data ware­house: We are not in­te­rested in the date of birth of a pa­per­boy. Other at­tri­bu­tes can­not be used for ag­gre­ga­ti­on in a me­a­ning­ful way. Those should be tag­ged as non-​dimension at­tri­bu­tes in the fact sche­ma.

Then de­ri­ve the fact sche­ma from the tree by de­fi­ning di­men­si­ons, fact at­tri­bu­tes and hier­ar­chies and build a glos­sa­ry for the fact at­tri­bu­tes if there are any.

So­lu­ti­on

En­ti­ty GETS is cho­sen as the only fact. Its iden­ti­fier be­co­mes the root of the at­tri­bu­te tree. All other at­tri­bu­tes or iden­ti­fiers be­co­me nodes.

Fi­gu­re D.E.50.2 - The at­tri­bu­te tree

Cus­to­mer, news­pa­per and pa­per­boy are de­fi­ned as di­men­si­ons, di­men­si­on day is in­tro­du­ced as a range of the date at­tri­bu­te. Time of de­li­very be­co­mes the only fact at­tri­bu­te; re­mem­ber num­ber of cus­to­mers is non-​additive, using the "aver­age" ope­ra­tor. The media group is tag­ged as op­tio­nal.

The ad­dress of a cus­to­mer can­not be used for ag­gre­ga­ti­on and is the­re­fo­re tag­ged as a non-​dimension at­tri­bu­te.

Fi­gu­re D.E.50.3 - The fact sche­ma

time of de­li­very = AVG(GETS.time of de­li­very)

This ex­er­ci­se is part of a case study: dfm - apa - log