Database and Data Warehouse
Database and Data Warehouse
(partial,exclusive) Teaches
(1,1) (0,n)
(0,n) (0,n)
Assistant Professor Section Prerequisite
Thesis title Status Semester Has prereq Is a prereq
Thesis description Tenure date (0,1) Year
/No courses Homepage (0,1) Course
(1,1)
(1,1) (0,n) Course id
(1,n)
Advisor CouSec Course name
Level
Simple attribute
(0,1) Complex attribute
Professor Teaches role name Attribute 1
(1,1)
Attribute 2
Identifier (1,1) (0,n) Optional att. (0,1)
Attributes
Other attributes (1,n) Multivalued attr. (1,n)
Section
(total,exclusive)
CouSec (partial,exclusive)
Partial Identifier
Other Attributes (total,overlapping)
(partial,overlapping)
Identifying
Weak Entity Type Relationship Type Generalization Generalization types
Employee no Employee no
Name First name
First name Last name
Last name Address
Address Email
Email Homepage
Homepage
Research areas (1,n)
Employee no Employee no
Name Name
... ...
Assistant Professor
Assistant Professor
Employee no Employee no
Thesis title Status Thesis title Status
... ... ... ...
Employee no
Name
…
Thesis title (0,1)
...
Status
...
Employee no Employee no
Name Name
First name First name
Last name Last name
Address Address
Email Email
Homepage Homepage
Research areas (1,n) Research areas (1,n)
Academic staff
Type
Academic staff Project Participates
Participates Type …
(0,n) (1,n) Participates (0,n)
Employee no Start date Project id Acad. staff
... End date ... Project Project
Start date Type
End date
…
Participates (1,n)
Nice 12 20 24 33
Paris
18
23
Q1 21 10 18 35 measure
Time (Quarter)
14
17
values
20
Q2 27 14 11 30
12
18
dimensions
33
Q3 26 12 35 32
10
Q4 14 20 47 31
games DVDs
books CDs
Product (Category)
Copyright © 2008 Elzbieta Malinowski & Esteban Zimányi 51
Hierarchies
Data granularity: Level of detail of measures
Data analyzed at different granularities (abstraction levels)
Hierarchies relate low-level (detailed) concepts to higher-
level (general concepts)
Example: Store – City – Region/Province – Country
Given two related levels in a hierarchy, lower level is called
child, higher level is called parent
Instances of these levels are called members
Ivanov Claus
Hallez Berger
Milan 24 18 28 14
ity e
Italy 57 43 51 39
(C tor
Rome 33 25 23 25
)
France
S
Nice 12 20 24 33
Paris 18 Q1 33 30 42 68
Time (Quarter)
23
41
Q1 21 10 18 35
14 17 Roll-up to the Country level
Time (Quarter)
Q2 27 14 11 30
20
37
Q2 27 14 11 30
12 18 Q3 26 12 35 32
33
51
Q3 26 12 35 32 0
1 Q4 14 20 47 31
Q4 14 20 47 31
games DVDs
games DVDs books CDs
books CDs Product (Category)
Product (Category)
Milan 24 18 28 14 Milan 8 6 9 5
ity e
(C tor
ity e
Rome 10 8 11 8
)
(C tor
Rome 33 25 23 25
)
S
Nice 4 7 8 10
S
Nice 12 20 24 33
Paris
Paris 18
6
10
Q1 21 10 18 35 23 Drill-down to the Jan 7 2 6 13
Time (Quarter)
14
14 17
3
Month level
Time (Quarter)
20
7
Q2 27 14 11 30 Feb 8 4 8 12
...
12 18
9
...
Q3 26 12 35 32 33 Mar 6 4 4 10
...
8
1 0
14
Q4 14 20 47 31 ... ... ... ... ...
5
games DVDs Dec 4 4 16 7
books CDs games DVDs
Product (Category) books CDs
Product (Category)
Milan 24 18 28 14
or t
ity e
DVDs 35 30 32 31
y)
eg c
(C tor
Rome 33 25 23 25
)
at du
CDs 18 11 35 47
S
(C Pro
Nice 12 20 24 33 games 10 14 12 20
Paris 18 books
10
Q1 21 10 18 35 23
21
Time (Quarter)
14 17 Paris 21 27 26 14
17
33
20
Store (City)
Q2 27 14 11 30
20
12 18 Pivot Nice 12 14 11 13
28
18
Q3 26 12 35 32 33
47
1 0 Rome 33 28 35 32
19
Q4 14 20 47 31
Milan 24 23 25 18
games DVDs
Q1 Q2 Q3 Q4
books CDs
Product (Category) Time (Quarter)
Milan 24 18 28 14
ity e
(C tor
Rome 33 25 23 25
)
Q1 21 10 18 35
Time (Quarter)
S
Nice 12 20 24 33
Paris 18 Q2 27 14 11 30
Q1 21 10 18 35 23
Time (Quarter)
14 17 Q3 26 12 35 32
Q2 27 14 11 30 20 Slice on Store.City = ‘Paris’
12 18 Q4 14 20 47 31
Q3 26 12 35 32 33
1 0 games DVDs
Q4 14 20 47 31 books CDs
Product (Category)
games DVDs
books CDs
Product (Category)
Milan 24 18 28 14
ity e
(C tor
Rome 33 25 23 25
)
ity e
(C tor
S
)
Nice 12 20 24 33 Nice 12 20 24 33
S
Paris 18 Paris
23
(Quarter)
Q1 21 10 18 35
14 17 Dice on Store.Country = ‘France’
Time (Quarter)
Q1 21 10 18 35
Time
14
Q2 27 14 11 30 20 and Time.Quarter= ‘Q1’ or ‘Q2’
1 2 8 Q2 27 14 11 30
1
33
Q3 26 12 35 32 0 games DVDs
1
books CDs
Q4 14 20 47 31
Product (Category)
games DVDs
books CDs
Product (Category)
Product Store
Store
City State
Store key
Store number City key State key
Store name City name State name
Store address City population State population
Manager name City area State area
City fkey State fkey State major activity
... ... ...
Copyright © 2008 Elzbieta Malinowski & Esteban Zimányi 67
Logical DW Design: Constellation Schemas
Promotion Sales Store