XML Queries on Relational Sources: A Syntactic Approach

Jonathan Robie


Many applications need to access both XML and relational data. This is often done by representing relational data as XML or by using an XML view of relational data. The ISO SQL/XML specification provides a standardized mapping from relational data sources to XML.

Given such a mapping, XQuery can be useful both for XML and XML views of relational sources, but mapping XQuery to SQL is complicated by the lack of nested structures in the relational model, and the difference in expressive power between XQuery and SQL. The ISO SQL/XML specification also adds XML construction operators to SQL. We show that this set of operators dramatically simplifies mapping XQuery queries for relational sources.

We present a subset of XQuery that is equivalent in power to SQL/XML, preliminary mappings that reduce XQuery to this subset, and preliminary mappings from the subset to SQL/XML. This syntax-centric approach is simple, effective, and independent of any underlying physical algebra.

Keywords: XQuery; SQL; Querying; Mapping

XML Queries on Relational Sources

A Syntactic Approach

Jonathan Robie [DataDirect Technologies]

Extreme Markup Languages 2002® (Montréal, Québec)

This paper is not represented in the conference proceedings.