Transcript Weymouth

XML-QL: A Query Language for XML
Submission to WWW Consortium August 19, 1998
Alin Deutsch, University of Pennsylvania
Mary Mernandez, AT&T Labs
Daniela Florescu, INRIA
Alon Levy, University of Washington
Dan Suciu, AT&T Labs
Reviewed by Terry E Weymouth
Monday, February 14, 2000
Example Data
<bib>
<book year="1995"> <!-- A good introductory text -->
<title> An Introduction to Database Systems </title>
<author> <lastname> Date </lastname> </author>
<publisher> <name> Addison-Wesley </name >
</publisher>
</book>
<book year="1998">
<title> Foundation for Object/Relational Databases:
The Third Manifesto </title>
<author> <lastname> Date </lastname> </author>
<author> <lastname> Darwen </lastname> </author>
<publisher> <name> Addison-Wesley </name >
</publisher>
</book>
</bib>
Example Query
WHERE <book>
<title> $t </>
<publisher><name>Addison-Wesley </> </>
</> CONTENT_AS $p IN "www.a.b.c/bib.xml”
CONSTRUCT<result><title> $t </>
WHERE <author> $a</> IN $p
CONSTRUCT <author> $a</>
</>
Results
<result>
<title> An Introduction to Database Systems </title>
<author> <lastname> Date </lastname> </author>
</result>
<result>
<title> Foundation for Object/Relational Databases:
The Third Manifesto </title>
<author> <lastname> Date </lastname> </author>
<author> <lastname> Darwen </lastname> </author>
</result>
Some Problems Addressed
• How to extract data (information?) from
large XML documents or document stores.
• How to exchange XML data between
disparate locals (exchanging queries might
be more efficient)
• How to exchange XML data between
different user communities
• How to integrate data from multiple XML
sources
Components and features
• Matching with Structural Patterns
• Binding variables to elements in the match
– construction
– joining elements by value
• Grouping with nested and combined queries
• Binding variables to tags in the match (also Skolem
functions)
• Regular expressions for path matching
• Construction
– query results in XML
– transforming XML data
• Embedding queries in data
Suggested Extensions
• User defined predicates
• Regular string expressions - element content
(what about attributes)
• Name Spaces
• Aggregates (e.g. GROUP-BY) - with
summation-type functions
• Semi-joins (i.e. joins over optional
elements)
Comments
• Data Model Features
– ordered or unordered sub-elements (imposing
order in results of query for unordered model!)
– graph structure: semi-structured data
– ID’s and ID references
• Extra-structure elements
– e.g. comment tags, document specifications
such as occurrence and ordering information
(DTD)