XML Europe 2003 logo

SQL/XML and XQuery

Abstract

The SQL Standard has created a query language called SQL/XML for querying relational data and creating XML results. The W3C has created a query language called XQuery for querying XML documents. Currently, the specifications address distinct functionality - SQL/XML operates on the borderline between SQL and XML, and XQuery lives in a purely XML world.

However, these distinctions are fading. Some vendors have extended SQL/XML to allow queries to also address data in XML. XQuery provides substantially the same query capability as SQL/XML, and some vendors are using XQuery to address XML views of relational data. Despite these trends, the two languages appeal to very different audiences - SQL/XML is very much an extension of SQL, designed for SQL programmers, and XQuery takes a purely XML view of the world. This difference also means that the languages are suited for different tasks. SQL/XML shines for queries that are essentially relational, but which need to return XML results. XQuery shines for XML processing, or for data integration across heterogeneous data sources.

This talk uses a series of concrete queries written in each language to show the advantages of each. It explains why we need both languages, discussing the ways in which the languages differ and in which they overlap. It also explores the role of SQL/XML mappings as a way of creating XML views for XQuery.

Keywords


The full paper was not available at the time the proceedings were created. Please check the conference web site, http://www.xmleurope.com, to find an updated version of this paper.

Biography

Jonathan Robie is the XML Program Manger at DataDirect technologies. He is also a co-inventor of XQuery, the W3C XML Query language, and is now an editor of many of the specifications which define the XQuery language. He is also a co-inventor of XQL, an earlier XML query language which was a predecessor of XPath. Jonathan has been significantly involved in several other W3C Working Groups, acting as an editor for documents produced by the XML Schema and Document Object Model Working Groups, and has also participated in the W3C XML Information Set and XML Stylesheet Language (XSL) Working Groups. He is well known in the XML world, both as an innovator and as a speaker.Prior to joining DataDirect, Jonathan worked as an XML ResearchSpecialist at Software AG, where he helped design architectures forXML servers and represented Software AG on the XML Query and XML Schema Working Groups. He has been on the architecture team for three XML databases or repositories, at Software AG, Texcel Research, and POET Software. He has a total of 13 years experience with advanced database systems and complex database applications, especially object oriented databases, multimedia databases, workgroup database applications, and XML/SGML databases.