XML Query Language: Advisor: Prof. Zaniolo Hung-Chih Yang Ling-Jyh Chen
XML Query Language: Advisor: Prof. Zaniolo Hung-Chih Yang Ling-Jyh Chen
Relational SQL
database
XML document
/database XQuery
What’s XQuery (cont.)
• XQuery is designed to meet the requirements
identified by the W3C XML Query Working Group
“XML Query 1.0 Requirements” and the use cases
in “XML Query Use Cases”.
• XQuery is designed to be a small, easily
implementable language.
• XQuery is flexible enough to query a broad
spectrum of XML information sources, including
both databases and documents.
• XQuery defines a human-readable syntax for that
language
What’s Xquery (cont.)
• The basic building block of XQuery is the
expression
• XQuery is a functional language (at least
the spec claimed it to be)
• XQuery is a strongly-typed language
XQuery vs XSLT
Reinventing the Wheel?
Result:
<instrument>electrocautery</instrument>
XQuery practice
• XML Query Language Demo,
http://131.107.228.20
• X-Hive. Another nice-looking online demo,
http://217.77.130.189:8080/demos/xquery/index.html
• Qexo: The GNU Kawa implementation of
XQuery, http://www.gnu.org/software/qexo/
Conclusion
• XQuery is a simple substitution of XSLT,
JSP, ASP, Servlet, CGI, PHP, etc.
• XQuery programs can accomplish most
tasks of other tools aforementioned, and yet
is much simplier to learn and easier to write.
• Possible direction is to extend XQuery for
UPDATE and INSERT to an XML database
• Still lack of support from industry till now
Reference
• Jonathan Pinnock, et al. “Professional XML, 2nd edition”, ISBN:
1861005059, WROX Publishers, 2001
• Serge Abiteboul, Peter Buneman and Dan Suciu, “Data on the Web: from
Relations to Semistructured Data and XML”, ISBN 1-55860-622-X,
Morgan Kaufmann Publishers, 2000
• World Wide Web Consortium, “XQuery 1.0. An XML Query Language”,
W3C Working Draft, Apr. 30, 2002
• World Wide Web Consortium, “XML Path Language (XPath) Version
1.0”, W3C Recommendation, Nov. 16, 1999
• Qexo: The GNU Kawa implementation of XQuery,
http://www.gnu.org/software/qexo/
• XQuery Tutorial
http://www.research.avayalabs.com/user/wadler/papers/xquery-tutorial/xquery-tutorial.pdf
• Don Chamberlin, Jonathan Robie, and Daniela Florescu, “Quilt: An XML
Query Language for Heterogeneous Data Sources”, WebDB 2000, Dallas,
May 2000