W3C home > Mailing lists > Public > www-ql@w3.org > January to March 2004

RE: SQL to XQuery translation

From: Michael Rys <mrys@microsoft.com>
Date: Thu, 15 Jan 2004 12:13:45 -0800
Message-ID: <EB0A327048144442AFB15FCE18DC96C701BFCC11@RED-MSG-31.redmond.corp.microsoft.com>
To: "David Song" <davidzsong@yahoo.com>, <www-ql@w3.org>

Some reasons why there is not much done in this area:

1. SQL is not powerful enough alone to query true XML data where mixed
content, order, changing structure really matters. You would have to
extend SQL fundamentally to allow this. There is some work going on at
the relational database companies and the ANSI/ISO standards level.
However, the focus there is mainly to leverage XPath and XQuery in the
context of SQL expressions. So mapping SQL to XQuery would also mean
that you define  relational semantics over the XML data, which you
cannot easily do for general XML documents (see the discussions of
edge/node-tables to represent XML relationally for some of the
complexity).

2. In order to query relational data marked up in XML, most commercial
systems provide a mapping level into XML (annotated schemata in SQL
Server 2000, XSD-based OR mapping in Oracle 9i, DADs in IBM DB2) and
then just let you use SQL to query it. So no need to map it to XQuery
since the primary implementation architecture is SQL.

If it would have been easy, I guess we would not have invested into
XQuery in the first place but just defined a relational semantics on XML
and be done with it...

Best regards
Michael

> -----Original Message-----
> From: www-ql-request@w3.org [mailto:www-ql-request@w3.org] On Behalf
Of
> David Song
> Sent: Wednesday, January 14, 2004 11:39 PM
> To: www-ql@w3.org
> Subject: SQL to XQuery translation
> 
> 
> I am in need of researching, designing, and
> implementing techniques to translate from SQL to
> XQuery.  Most (if not all) research has been focused
> on XQuery->SQL, now I need the reverse!  I believe is
> challenge is how to map SQL predicates into XPath
> expressions.  SQL joins is another challenge.
> 
> The business usage case is that users need to be able
> to construct AdHoc queries using SQL to query XML data
> residing in native XML database.  I need help in
> designing algorithms to map SQL to XQuery/XPath.  I
> have not found any research in this area.
> 
> I very much appreciate if anyone can point me in the
> right direction.  I have some preliminary design
> thoughts if anyone is interested in a more detailed
> discussion with me.  Thanks!
> 
> David Song
> College of Engineering
> San Jose State University
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes
> http://hotjobs.sweepstakes.yahoo.com/signingbonus
> 
Received on Thursday, 15 January 2004 15:14:57 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:19 GMT