[transquery-discuss] Aggregate Functions and Closure

From: Dan Diebolt (dandiebolt@yahoo.com)
Date: Tue Dec 04 2001 - 12:47:21 CET


I wanted to inquire about TransQuery's approach to aggregate
functions and the general handling of closure.

The expected results from the majority of queries in Use Case "R" -
(Access to Relational Data) return some type of XML table with
representation for rows/tuples/records. For example, the expected
result for Q4 (List item numbers and descriptions of items that
have no bids) is as follows:

 <result>
  <no_bid_item>
   <itemno>1005</itemno>
   <description>Tennis Racket</description>
  </no_bid_item>
  <no_bid_item>
   <itemno>1006</itemno>
   <description>Helicopter</description>
  </no_bid_item>
  <no_bid_item>
   <itemno>1008</itemno>
   <description>Broken Bicycle</description>
  </no_bid_item>
 </result>

This result clearly has table structure:

 itemno | description
 -------+---------------
 1005 | Tennis Racket
 1006 | Helicopter
 1008 | Broken Bicycle

However, Q7 (Find the highest bid ever made for a bicycle or tricycle)
requires aggregation and its expected result is non-tabular:

 <high_bid><bid>225</bid></high_bid>

I suppose you could make it tabular but wrapping it with <result>:

 <result><high_bid><bid>225</bid></high_bid></result>

For *relational* queries, should TransQuery have a convention for closure
of always returning a table-like XML structure or an just an arbitrary XML
fragment? I can see a lot of benefits to insuring a table like structure
is returned in terms of styling the result into a displayable <table>.

What are peoples views on this?

__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com



This archive was generated by hypermail 2.1.4 : Fri Feb 22 2002 - 11:35:58 CET