RE: SQL to XQuery translation

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 UTC