prof. bayer, dwh, ch. 4.5, ss 20021 chapt.4.5 modeling of features of dimensions within a dimension...
TRANSCRIPT
![Page 1: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/1.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
1
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.
![Page 2: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/2.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
2
Example of heterogeneous Hierarchy with Features
Dimension Products
Brand Prod-Group ModelBMW
Cars (cc, PS, cyl, fuel) 318 ... 750
MotorcyclesSony
Cameras (reflex, digital, focal length)TVs (screensize, audio, color, flat) Computers Vaio 451 ...
Daimler-ChrCarsBusesTrucks
![Page 3: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/3.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
3
Partial Schema for Features
shows
possessesP#,FN,F-Value
P#Products
belongsPG#
Prod-Group
Feature
FN, Unit
n
n 1
n
mm
![Page 4: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/4.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
4
Auxiliary Query for Query Formulation
to see the features of the product-group ‚Car‘:
select FN, Unitfrom Prod-Group G, shows s, Feature Fwhere G.name = ‚Car‘ and
G.PG# = s.PG# ands.FN = F.FN
i.e. semantic help for follow-up query
![Page 5: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/5.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
5
„P# of engines with 2800 cc“
select P# from Posesses poswhere pos.FN = ‚cc‘ and
pos.F-Value = ‚2800‘
![Page 6: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/6.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
6
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 systemVAT-RateSteuer-Hebesatz
Exercise: construct detailed schema for this
![Page 7: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/7.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
7
MonthM# belongs_T D#
Time
shows_T
Feature-TFN, unit
Posesses_TD#, FN, F-Value
P# Products
Facts
Posesses_PP#, FN, F-Value
![Page 8: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/8.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
8
P# Products
Facts
Posesses_PP#, FN, F-Value
Region
belongs_P
Feature-PFN, Unit
Prod-GroupPG#
shows_P
n
n
m
k
...
mm
![Page 9: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/9.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
9
Typical features for months:
avg temperatureavg sunshineavg beer consumption on holidays
Production planing forbeer and icecream
![Page 10: Prof. Bayer, DWH, CH. 4.5, SS 20021 Chapt.4.5 Modeling of Features of Dimensions Within a dimension hierarchy, elements at the same level may have different](https://reader036.vdocuments.site/reader036/viewer/2022082819/56649f2f5503460f94c491a6/html5/thumbnails/10.jpg)
Prof. Bayer, DWH, CH. 4.5, SS 2002
10
Typical Query
Sales wherescreensize = 17 Brand = Sony ( Year = 1999 Month = Dec Year = 2000 Month = Jan)
screensize restriction on Product-HierarchyBrand restriction on Manufacture-Hierarchy
or additional restriction on Product-HierarchyCombine all restrictions to get one or a few Query-Boxes on Base-Cube. Retrieve Query-Boxes only from Base-Cube, perform
1. Post-filtering2. aggregation
Problem: Restrictions, computations based on F-Values?
Be careful with type Incompatibilities!