- From: Jim Melton <jim.melton@acm.org>
- Date: Fri, 07 Mar 2003 08:54:02 -0700
- To: Nitin Mangtani <nitinm@bea.com>
- Cc: Michael Burbidge <mburbidg@adobe.com>, www-ql@w3.org
Nitin,
Better late than never, right?
I believe that the reason XQuery does not have a grouping operator in
version 1 has at least 2 components. First, the perception was (and is)
that grouping is sufficiently complex that we shouldn't delay progress on
the rest of the language just to permit adding grouping. Second, there
exists a number of people (I will, with my tongue only partly in my cheek,
refer to them as "doc-heads") who believe that grouping is an order of
relatively low importance.
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.
Jonathan Robie (and, to be fair, others) did a considerable amount of work
to try to persuade the WG of the necessity of having a grouping
capability. Recently, Jonathan made a valiant effort to get a grouping
capability into the language...sort of a last-minute attempt. Don
Chamberlin wrote a message to Jonathan, me, and at least a few others
(perhaps to the entire Query WG?) that illustrated a grouping capability
that is quite useful in certain situations (e.g., grouping by individual
elements and not multiple elements. This approach is probably "good
enough" for version 1, allowing us to consider a more complete grouping
facility in a future version of the XQuery specification.
I agree with you that a direct grouping operator makes life easier for
users. (It might or might not make it easier for vendors, depending on how
much attention is paid to optimization of grouping.) But I think that it
really is too late in the process to add such an operator now.
Hope this helps,
Jim
At 21:03 2003-03-06 -0800 Thursday, Nitin Mangtani wrote:
>Jim,
>
> Sorry for jumping on this tread late, why "Group By" did not make into
> XQuery spec. I understand one can use combination of distinct and
> aggregate function to simulate a Group By. But having a direct Group By
> makes life much easier for everyone (Customers, Vendors, you? and me;) ).
========================================================================
Jim Melton --- Editor of ISO/IEC 9075-* (SQL) Phone: +1.801.942.0144
Oracle Corporation Oracle Email: mailto:jim.melton@oracle.com
1930 Viscounti Drive Standards email: mailto:jim.melton@acm.org
Sandy, UT 84093-1063 Personal email: mailto:jim@melton.name
USA Fax : +1.801.942.3345
========================================================================
= Facts are facts. However, any opinions expressed are the opinions =
= only of myself and may or may not reflect the opinions of anybody =
= else with whom I may or may not have discussed the issues at hand. =
========================================================================
Received on Friday, 7 March 2003 10:56:34 UTC