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

RE: XQuery and relational databases...

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Sat, 8 Mar 2003 15:46:02 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453E11D@daemsg02.software-ag.de>
To: Jim Melton <jim.melton@acm.org>, Nitin Mangtani <nitinm@bea.com>
Cc: Michael Burbidge <mburbidg@adobe.com>, www-ql@w3.org

> It has been asserted that the relational grouping operator 
> (GROUP BY) is 
> not appropriate for use in an XML query language.  I admit 
> that I don't 
> fully understand the arguments (yet), but I have a sort of intuitive 
> understanding of at least some of the issues.  The most 
> important one is, 
> of course, that the relational GROUP BY operates strictly on 
> a virtual 
> table (a regular, rectangular structure with every cell occupied by 
> *something*, even if the null value), while an XQuery 
> grouping operator 
> would have to operate on semi-structured tree structures.  
> The challenges 
> of the latter clear exceed those of the former, even if some 
> lessons of the 
> former can be learned and used in designing the latter.

I think the real difference is not in the nature of the input, it is in the
nature of the output. If you look at the use cases compiled by Steve Muench
(I posted a reference earlier), they all have the characteristic that the
output is a tree, in the form

       group header
       </item> (repeats once for each item in a group)
       group footer
   </group> (repeats once for each group)

This is quite different from SQL grouping, which is constrained to produce a

> But I think that it 
> really is too late in the process to add such an operator now.
I fear that you are probably right, given that most XQuery working group
members are not up to speed with the extensive experience of XML grouping
problems and solutions developed in the XSLT user community, and are likely
to want to investigate the problem from scratch rather than re-using
existing solutions.

Michael Kay
Received on Saturday, 8 March 2003 09:46:27 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:17:16 UTC