implementing operations to navigate semantic star schemas alberto abelló, josé samos and fèlix...
TRANSCRIPT
Implementing Operations to Navigate Semantic Star Schemas
Alberto Abelló, José Samos and Fèlix SaltorU. Politècnica de Catalunya & U. de Granada
November 7th, 2003
DOLAP
November 7th, 2003 Alberto Abelló 2
Contents
Related Work Multidimensional Algebra Translation to SQL New Drill-across possibilities Conclusions
Con
tent
s
November 7th, 2003 Alberto Abelló 4
Multi-star Schemas Kimball: Share Dimensions Giovinazzo: Galaxy sharing Dimensions Pedersen and Jensen: Multidimensional
Object Family sharing subdimensions Gopalkrishnan, Li, and Karlapalem: Multi-
star Schemas normalizing fact tables Moody and Kortink:
– Constellation (hierarchically linked fact tables)– Galaxy (share Dimensions)– Star Cluster (sharing subDimensions)
Rel
ated
wor
k
November 7th, 2003 Alberto Abelló 5
Semantic Relationships
Tryfona, Busborg, and Christiansen: EER Trujillo, Palomar, Gómez and Song: UML
(Generalization and Association inside a Star)
Abelló, Samos and Saltor: UML (Generalization, Association, Derivation and Flow between Stars)
Rel
ated
wor
k
November 7th, 2003 Alberto Abelló 6
Cube M
ulti
dim
ensi
onal
Alg
ebra
A Cube is and injective function from an n-dimensional finite space (defined by the cartesian product of n functionally independent Levels {L1,..,Ln}), to the set of instances of a Cell (Cc).
c:L1 x .. x Ln Cc injective
November 7th, 2003 Alberto Abelló 8
Primitive Operations M
ulti
dim
ensi
onal
Alg
ebra
Drill-across Change Base Roll-up Union Dice Projection
November 7th, 2003 Alberto Abelló 9
Operations (I) M
ulti
dim
ensi
onal
Alg
ebra
Change Base :Lo
1 x .. x Lon Li
1 x .. x Lim injective
:Cic Co
c injective
Drill-across
co(x) = (ci) = (ci(x))
co(x) = (ci) = ci( (x))
November 7th, 2003 Alberto Abelló 10
Operations (II) M
ulti
dim
ensi
onal
Alg
ebra
Union
Roll-up
co(x) = c1 c2 =
:Lij Lo
k exhaustive
co(x) = (ci) = ci(y)(y) = x
{c1(x) if xDom(c1)c2(x) if xDom(c2)
November 7th, 2003 Alberto Abelló 11
Operations (III)
Dice
co(x) = m1,..,mk(ci) = ci(x)[m1,..,mk]
Projection
co(x) = P(ci) ={ci(x) if P(x)undef if ¬P(x)
Mul
tidi
men
sion
al A
lgeb
ra
November 7th, 2003 Alberto Abelló 12
Derived Operations: Slice
co(x) = sliceLi=k(ci) = L1x..xLi-1xLi+1x..xLn( Li=k
(ci))
Mul
tidi
men
sion
al A
lgeb
ra
November 7th, 2003 Alberto Abelló 20
Effects of operations T
rans
lati
on to
SQ
L
Clause ChangeBase Drill-across Dice Roll-up Projection Union
SELECT Level (replace)
Measure (add)
Level (replace)
Measure (remove)
FROM Dimension (add)
Fact (add)
WHERE links (add)
links (add)
AND OR
GROUP BY Level (replace)
Level (replace)
ORDER BY Level (replace)
Level (replace)
November 7th, 2003 Alberto Abelló 22
DerivationN
ew D
rill
-acr
oss
Pos
sibi
liti
es
Implementation: Updatable views ChangeBase
– View to table -> OK– Table to view -> Iff view subsumes WHERE
Drill-across– View to table -> OK– Table to view -> Outer join
November 7th, 2003 Alberto Abelló 23
GeneralizationN
ew D
rill
-acr
oss
Pos
sibi
liti
es
Implementation: One table for superclass and another one for each subclass
ChangeBase – Sub to super -> OK– Super to sub -> Iff criterion subsumes WHERE
Drill-across– Sub to super -> OK– Super to sub -> Outer join
November 7th, 2003 Alberto Abelló 24
AssociationN
ew D
rill
-acr
oss
Pos
sibi
liti
es
Implementation: Foreign keys ChangeBase
– 1:1 -> OK– 1:N and N:1 -> Depends on the bases
Drill-across– 1:1 -> OK– 1:N -> Do it to an upper detail level being 1:1– N:1 -> Double counting– Zeros -> Outer join
November 7th, 2003 Alberto Abelló 25
FlowN
ew D
rill
-acr
oss
Pos
sibi
liti
es
Implementation: Foreign keys ChangeBase
– #old=#new -> OK– #old<>#new -> Weighting factors for facts– Appear or disappear -> Dice apropriately
Drill-across– #old=#new -> OK– #old<>#new -> ChangeBase– Appear or disappear -> Outer join
November 7th, 2003 Alberto Abelló 26
Conclusions
Navigational (algebraic) queries Smoothly implemented on SQL Multistar semantic queriesC
oncl
usio
ns