Prof. Bayer, DWH, CH. 4.5, SS Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different attributes (properties). Consider the Product Groups (PG) Car: (cc, PS, cyl, fuel) Camera: (reflex, digital, focal length) TV: (screensize, audio, color, flat) etc. Such specific properties are called Features in DWH If all elements have the same attributes, modelling is trivial, within a common relation.
Prof. Bayer, DWH, CH. 4.5, SS Example of heterogeneous Hierarchy with Features Dimension Products BrandProd-GroupModel BMW Cars (cc, PS, cyl, fuel) Motorcycles Sony Cameras (reflex, digital, focal length) TVs (screensize, audio, color, flat) ComputersVaio Daimler-Chr Cars Buses Trucks
Prof. Bayer, DWH, CH. 4.5, SS Partial Schema for Features shows possesses P#,FN,F-Value P# Products belongs PG# Prod-Group Feature FN, Unit n n 1 n m m
Prof. Bayer, DWH, CH. 4.5, SS Auxiliary Query for Query Formulation to see the features of the product-group ‚Car‘: select FN, Unit from Prod-Group G, shows s, Feature F where G.name = ‚Car‘ and G.PG# = s.PG# and s.FN = F.FN i.e. semantic help for follow-up query
Prof. Bayer, DWH, CH. 4.5, SS „P# of engines with 2800 cc“ select P# from Posesses pos where pos.FN = ‚cc‘ and pos.F-Value = ‚2800‘
Prof. Bayer, DWH, CH. 4.5, SS Problem: F-values have specific Units and therefore types, e.g. cc, PS, audio, screensize, … How to code, represent F-Value? Ex: Cities belong to countries, which show features like: currency political system VAT-Rate Steuer-Hebesatz Exercise: construct detailed schema for this
Prof. Bayer, DWH, CH. 4.5, SS Month M# belongs_TD# Time shows_T Feature-T FN, unit Posesses_T D#, FN, F-Value P# Products Facts Posesses_P P#, FN, F-Value
Prof. Bayer, DWH, CH. 4.5, SS P# Products Facts Posesses_P P#, FN, F-Value Region belongs_P Feature-P FN, Unit Prod-Group PG# shows_P n n m k... m m
Prof. Bayer, DWH, CH. 4.5, SS Typical features for months: avg temperature avg sunshine avg beer consumption on holidays Production planing for beer and icecream
Prof. Bayer, DWH, CH. 4.5, SS Typical Query Sales where screensize = 17 Brand = Sony ( Year = 1999 Month = Dec Year = 2000 Month = Jan) screensize restriction on Product-Hierarchy Brand restriction on Manufacture-Hierarchy or additional restriction on Product-Hierarchy Combine all restrictions to get one or a few Query-Boxes on Base-Cube. Retrieve Query-Boxes only from Base-Cube, perform 1. Post-filtering 2. aggregation Problem: Restrictions, computations based on F-Values? Be careful with type Incompatibilities!