Re: Units needed in ADQL-0.7

From: Clive Page <cgp-at-star.le.ac.uk>
Date: Fri, 16 Jan 2004 11:42:44 +0000 (GMT)


I think that what Tony is saying is that the AstroGrid model of how the VO works is like this (if I've got this wrong no doubt he will correct me):

Every query from an astronomer using the VO has to go via a Portal and (though the astronomer need not know this) a Registry: direct access to data centers is not allowed, except wholly outside the VO. The user accesses a Portal to compose a query and does so using agreed standards for units: say degrees for all celestial coordinates, or milliarcseconds/year for proper motions, or Janskys for fluxes, or whatever we come up with; no doubt a good portal will support sexagesimals for RA/DEC. The Portal then fans this query out to one or more data centres and in each case does the appropriate translation, but not of the syntax only the units, since we have agreed to use ADQL. Of course if a Portal allows a power user to enter an SQL-like string query, this does have its syntax translated to the ADQL equivalent, along with the units conversions, but the current thinking in AstroGrid seems to be that queries will all be generated using drop-down lists and similar, in which the user can be notified of the column names allowed, and the units to be used in expressions.

This translation is possible because the Registry is omniscient: it knows the units of every column in every table in every database of every data center in the VO world, it can therefore translate every numerical constant in every query to the units actually appropriate for each column. Since ADQL is only used for these translated queries, units are not needed in ADQL, provided we have agreed standards for them.

The query parser obviously has to be quite good to work out, for each numerical constant, which column it is being applied to, and therefore the appropriate units conversion, but since we are translating SQL to XML form anyway, this may not be too difficult.

The other aspect of the design is that it should be possible to send a query to more than one destination using UCDs rather than column names. The translation again being done by the Registry, upon request by the Portal. This requires us to define a standard set of units for each UCD, as at present UCDs and units have been carefully decoupled.

The alternative model, of course, is that the same query is sent to each data center, and translated to specific JDBC/SQL locally, when both the syntax and the units are converted. This does require either standard units in each ADQL query, or a notation for specifying them.

-- 
Clive Page
Dept of Physics & Astronomy,
University of Leicester,    Tel +44 116 252 3551
Leicester, LE1 7RH,  U.K.   Fax +44 116 252 3311
Received on 2004-01-16Z12:43:25