Title: Approximate Functional Dependencies for XML Data
1Approximate Functional Dependencies for XML Data
- Fabio Fassetti, Bettina Fazzinga
DEIS, University of Calabria, Italy
ADBIS 2007 - Varna (BUL), September 29 - October 3
2Outline
- Preliminaries
- Inference Problem
- Classical Approach
- Our Approach
- System Architecture
- Conclusions
3PreliminariesXML Functional Dependency
XML Paths
p1, p2,pn ? q
Right Part
Left Part
XML Tree
XFD
/faculty/course/name, /faculty/course/year ?
/faculty/course/professor
4PreliminariesTuples
/faculty/course/name/text, /faculty/course/profe
ssor/text
5Inference Problem
XML Functional Dependencies
XML Document
XML Document
Is it satisfied?
XFD
6Classical Approach XFD Satisfaction
XFD f p1, p2,pn ? q
XML Document
f is satisfied if and only if each pair of
tuples satisfies f
Tuples t1, t2, , tm
no
(ti, tj) satisfies f
yes
Are ti, tj equal w.r.t. the left part of f?
Are ti, tj equal w.r.t. the right part of f?
no
yes
ti, tj
(ti, tj) does not satisfy f
ß
f is not satisfied by the XML Document
7Classical Approach XFD Satisfaction
XML Tree
?
XFD
/faculty/course/name/text ? /faculty/course/profe
ssor/text
Tuples
8Classical Approach XFD Satisfaction
?
Yes
/faculty/course/name/text ? /faculty/course/profe
ssor/text
(2,3)
ok
(1,2)
(1,3)
ok
ok
1
2
3
?
?
9Classical Approach XFD Satisfaction
?
YES!
/faculty/course/name ? /faculty/course/book
(1,3) ok
(2,3) ok
(1,2) ok
1
2
3
10Classical Approach Flaw 1
?
NO!
/faculty/course/name ? /faculty/course/book
(1,3) no
1
2
3
11Our Approach s-approximation
?
YES!
/faculty/course/name ? /faculty/course/book
(1,2) ok
(2,3) ok
(1,3) ok
s-satisfied
1
2
distlts
3
distlts
12Classical Approach Flaw 2
?
YES!
/faculty/course/professor ? /faculty/course/semest
er
(1,2) ok
(1,3) ok
(2,3) ok
1
2
3
13Our Approach s-approximation
?
NO!
/faculty/course/professor ? /faculty/course/semest
er
(1,3) NO
Not s-satisfied
1
2
3
14Classical Approach Flaw 3
?
NO!
/faculty/course/name ? /faculty/course/credits
(1,3) no
(1,4) ok
(1,2) no
(1,5) ok
(2,3) ok
(2,4) ok
(2,5) ok
(3,4) ok
(3,5) ok
(4,5) ok
1
2
3
4
5
15Our Approach s-approximation
?
NO!
/faculty/course/name ? /faculty/course/credits
(1,3) no
(1,4) ok
(1,2) no
(1,5) ok
(2,3) ok
(2,4) ok
(2,5) ok
(3,4) ok
(3,5) ok
(4,5) ok
Not s-satisfied
1
2
3
4
5
16Our Approach q-approximation
?
YES!
/faculty/course/name ? /faculty/course/credits
s-satisfied
(1,3) no
(1,4) ok
(1,2) no
(1,5) ok
(2,5) ok
(3,5) ok
(2,3) ok
(2,4) ok
(3,4) ok
(4,5) ok
1
2
3
4
5
17Our Approach q-approximation
YES!
/faculty/course/name ? /faculty/course/credits
ß
Set of tuples 1,2,3,4,5
q-satisfied
4/5 gt q ?
Maximal set of tuples s-satisfying the XFD
2,3,4,5
1
2
3
4
5
18Our Approach Approximate Inference
s
XML Document
q
XML Functional Dependencies
XML Document
Is it (s,q)-satisfied?
XFD
19Our ApproachXFD Approximate Satisfaction
XFD f p1, p2,pn ? q
XML Document
Tuples t1, t2, , tm
(ti, tj) s-satisfies f
no
yes
Are ti, tj s-similar w.r.t. the left part of f?
Are ti, tj s-similar w.r.t. the right part of f?
yes
no
ti, tj
(ti, tj) does not s-satisfy f
THEN f is not satisfied by the XML Document
20Our ApproachXFD Approximate Satisfaction
XFD f p1, p2,pn ? q
XML Document
Tuples t1, t2, , tm
Compute the size of the maximal set of tuples
s-satisfying f
Is this size at least the q of the total number
of tuples?
yes
no
f is (s,q)-satisfied by the XML document
f is not (s,q)-satisfied by the XML document
21Fox System Architecture
XFD Checker
XFD Generator
Preprocessing Module
Graphical User Interface
XML Doc
s, q
XFDs (s,q)-approx satisfied
22Conclusions
- The concept of approximate satisfaction of XFDs
has been motivated and discussed - A system to infer such XFDs has been presented
23Thank You