Multivalued dependencies and a 4NF for XML - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Multivalued dependencies and a 4NF for XML

Description:

Section Emp='e1' Project='j1'/ /Dept Dept Section Emp='e3' Project='j2'/ /Dept ... Emp. v8 'e3' A. Project 'j2' v10. Basic Definitions ... – PowerPoint PPT presentation

Number of Views:27
Avg rating:3.0/5.0
Slides: 19
Provided by: jerr92
Category:

less

Transcript and Presenter's Notes

Title: Multivalued dependencies and a 4NF for XML


1
Multivalued dependencies and a 4NF for XML
  • Millist W. Vincent and Jixue Liu
  • School of Computer and Information Science
  • University of South Australia

2
Overview
  • Motivation.
  • Basic Definitions.
  • MVDs in XML.
  • Redundancy in XML.
  • Hierarchical XMVDs.
  • A 4NF for XML.
  • Conclusions and future research.

3
Motivation
  • Large amounts of data stored in XML format.
  • How to normalize XML documents to avoid
    redundancy?
  • FDs and MVDs are the basis for normalization in
    relations.
  • Recent research has defined functional
    dependencies and a redundancy free normal form
    for XML.
  • How to extend the approach to multivalued
    dependencies in XML?

4
Multivalued Dependencies in XML
  • Modeling XML Documents
  • ltrootgt
  • ltDeptgt
  • ltSection Empe1 Projectj1/gt
  • lt/Deptgt
  • ltDeptgt
  • ltSection Empe3 Projectj2/gt
  • lt/Deptgt
  • lt/rootgt

5
Basic Definitions
  • Path is a sequence of labels from the root, e.g.,
  • root.Dept.Section
  • Path intersection e.g.,
  • root.Dept.Section.Emp ? root.Dept.Section.Project
    root.Dept.Section

E
root
vr
E
E
Dept
v2
Dept
v1
E
E
Section
v3
Section
v7
A
Emp
v4
A
A
A
Project
v6
Emp
v8
Project
v10
e1
j1
e3
j2
6
Basic Definitions (cont.)
  • Path instances of a path. For example, a path
    instance of
  • root.Dept.Section is vr. v1. v3
  • Function Paths(q) is the set of all path
    instances of path q.
  • Function N(root.Dept)v1, v2
  • Function Nodes(v1, root.Dept.Section)v3
  • Function val(v3)v3, val(v4)e1.

E
root
vr
E
E
Dept
v2
Dept
v1
E
E
Section
v3
Section
v7
A
Emp
v4
A
A
A
Project
v6
Emp
v8
Project
v10
e1
j1
e3
j2
7
XMVD Definition
  • Let P be a consistent set of paths and let T
    be an XML tree that conforms to P and is
    complete. An XMVD is a statement of the form p
    \rightarrow\rightarrow
  • q r where p, q and r are paths in P.
    T satisfies p \rightarrow\rightarrow
  • q r if whenever there exists two distinct
    paths path instances v _1. \cdots.
  • v _n and
  • w_1. \cdots. w _n in Paths(q) such that
  • (i) val(v_n) \neq val(w _n)
  • (ii) there exists two nodes z_1, z_2, where
    z_1 \in
  • Nodes(x_1_1, r) and z_2 \in Nodes(y_1_1,
    r) such that val(z_1)
  • \neq val(z_2)
  • (iii) there exists two nodes z_3 and z_4,
    where
  • z_3 \in Nodes(x_1_1_1, p) and z_4 \in
    Nodes(y_1_1_1, p), such that val(z_3)
    val(z_4)
  • then
  • (a) there exists a path v'_1. \cdots. v'_n in
    Paths(q) such that
  • val(v'_n) val(v_n) and there exists a node
    z'_1 in

8
XMVD Example
  • root.Id.Course ??
  • root.Id.Id.Teacher.S root.Id.Id.Text.S
  • is satisfied.

9
XMVD Definition
  • How do we know the definition of an XMVD is
    correct?
  • NO definite answer, but in another paper we show
    that for a very wide class of mappings from a
    relation to XML a relation satisfies an MVD if
    the XML document satisfies the XMVD.
  • Hence there is a natural correspondence between
    MVDs in relations and XMVDs in XML.

10
XMVD Example (contd.)
  • root.Project.P??root.Project.Person.Nameroot.Pr
    oject.Part.Pid
  • is violated.

11
XMVD Example
  • root.Id.Course ?? root.Id.Id.Teacher.Sroot.Id.Id.
    Text.S is satisfied.

12
XMVD Example (contd.)
  • root.Project.Person.Name ??Root.Project.Person.Ski
    llroot.Project.P
  • is violated.

13
Redundancy in XML
  • An XML tree has redundancy if there exists a node
    such that every change of the value of the node
    to a new value results in violating the MVDs.
  • Example Consider the tree below and XMVD
    root.Id.Course? ?root.Id.Id.Teacher
    root.Id.Id.Id.Text. All Teacher and Text nodes
    are redundant.

14
Hieararchical XMVDs and Keys
  • A set of XMVDs is said to be hierarchical if for
    every XMVD p \rightarrow\rightarrow qr
    Parnt(p) is a strict prefix of both q
  • and r. A path p is a key if N(p) contains no
    duplicate values.

15
4NF for XML
  • A set of hierarchical XMVDs and keys is in 4XNF
    if for every p ?? qr if either of the following
    conditions hold(i)q and r are both
    keys(ii)p is a key and q ? r p.
  • Theorem If a set of XMVDs and keys is in 4XNF
    then no tree which satisfies the XMVDs has
    redundancy.

16
4NF Example
4NF Example
  • Example Consider the set of XMVDs
    root.Id.Course? ?root.Id.Id.Teacher
    root.Id.Id.Id.Text. Not in 4XNF.

17
4NF Example (contd.)
  • Consider the set of XMVDs root.Id.Course ??
  • root.Id.Id.Teacher.S root.Id.Id.Text.S and
  • root.Id.Id.Teacher is a key and
  • root.Id.Id.Text is a key. 4XNF is satisfied.

18
Future Work
  • Need to extend main theorem to the case of
    arbitrary XMVDs.
  • Is 4XNF a necessary condition for no redundancy.
  • XFD implication is decidable. Is XMVD implication
    decidable?
  • Axiom system for XMVD implication?
  • Polynomial time algorithm for XMVD implication?
  • Interaction between XFDs and XMVDs.
Write a Comment
User Comments (0)
About PowerShow.com