dw design hierarchies_7
DESCRIPTION
Diseño de jerarquiasTRANSCRIPT
![Page 1: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/1.jpg)
DATA WAREHOUSING Multi Dimensional Data Modeling Hierarchies and Levels
![Page 2: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/2.jpg)
2
![Page 3: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/3.jpg)
3
customer custId name address city
53 joe 10 main sfo
81 fred 12 main sfo
111 sally 80 willow la
product prodId name price
p1 bolt 10
p2 nut 5
store storeId city
c1 nyc
c2 sfo
c3 la
sale oderId date custId prodId storeId qty amt
o100 1/7/97 53 p1 c1 1 12
o102 2/7/97 53 p2 c1 2 11
105 3/8/97 111 p1 c3 5 50
3
![Page 4: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/4.jpg)
Group data within dimensions: SalesRep
Region
▪ SubRegion ▪ Country
Customer
4 4
![Page 5: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/5.jpg)
Hierarchies are logical structures that use ordered levels as a means of organizing data.
For a particular level value, a value at the next higher level is its parent, and values at the next lower level are its children
5 5
![Page 6: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/6.jpg)
Hierarchies impose a family structure on dimension values. For a particular level value, a value at the next higher level is its parent, and values at the next lower level are its children.
These familial relationships enable analysts to access data quickly.
6 6
![Page 7: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/7.jpg)
A dimension can be composed of more than one hierarchy.
7
time day week month quarter year
1 1 1 1 2000
2 1 1 1 2000
3 1 1 1 2000
4 1 1 1 2000
5 1 1 1 2000
6 1 1 1 2000
7 1 1 1 2000
8 2 1 1 2000
days
weeks months
weeks
years
quarters
months
7
![Page 8: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/8.jpg)
Query tools use hierarchies to enable you to drill down into your data to view different levels of granularity.
This is one of the key benefits of a data warehouse.
8 8
![Page 9: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/9.jpg)
When designing hierarchies, you must consider the relationships in business structures. For example, a divisional multilevel sales organization.
9 9
![Page 10: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/10.jpg)
A level represents a position in a hierarchy. For example, a time dimension might have a hierarchy that represents data at the month, quarter, and year levels.
Within a hierarchy, each level is logically connected to the levels above and below it.
time day week month quarter year
1 1 1 1 2000
2 1 1 1 2000
3 1 1 1 2000
4 1 1 1 2000
5 1 1 1 2000
6 1 1 1 2000
7 1 1 1 2000
8 2 1 1 2000
years
quarters
months
10
![Page 11: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/11.jpg)
The levels in a dimension are organized into one or more hierarchies.
months
weeks
years
quarters
months
11
![Page 12: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/12.jpg)
Levels range from general to specific, with the root level as the highest or most general level.
all
years
quarters
months
days
weeks
12
![Page 13: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/13.jpg)
Level relationships specify top-to-bottom ordering of levels from most general (the root) to most specific information.
They define the parent-child relationship between the levels in a hierarchy.
13
![Page 14: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/14.jpg)
store storeId cityId tId mgr
s5 sfo t1 joe
s7 sfo t2 fred
s9 la t1 nancycity cityId pop regId
sfo 1M north
la 5M south
region regId name
north cold region
south warm region
sType tId size location
t1 small downtown
t2 large suburbs
store city region
14
![Page 15: Dw design hierarchies_7](https://reader033.vdocuments.net/reader033/viewer/2022050719/558492d7d8b42a0f5a8b45b2/html5/thumbnails/15.jpg)
The Data Warehouse Toolkit.Second Edition.The Complete Guide to Dimensional Modeling.Ralph Kimball.Margy Ross