Units needed in ADQL-0.7

Martin Hill mchill at dial.pipex.com
Fri Jan 16 07:58:47 PST 2004


That's a fair point that the translation need not happen at the portal either. 
In fact I would see it much more likely to happen around whatever job/workflow 
step that will also be working out how and where to do joins, where best to 
gather results, etc.

We *could* argue that if the user is submitting a query directly to a 
datacenter, then the user should use the datacenters units.  On the other hand, 
it would be 'nice' if we could develop - once - libraries for datacenters so 
that users wouldn't have to care.  And the datacenters will understand their own 
data units best.

Which is basically the rub - the more functionality we put in the datacenter, 
the harder it may be for data owners to publish their data.  And we want it to 
be *really easy* at least to begin with.

I suggest: Add it as 'optional' in the ADQL schema for now. If no unit is given, 
the units of the column are assumed.  We can then try out the conversion 
processes at various spots - and if any datacenter cannot handle the unit 
conversion in these early days, it can throw an exception or we can mark it in 
the metadata.



Ed Shaya wrote:

> Wil,
> 
> I thought that it would always be permissible for the user to form their 
> query directly in ADQL.  If so, then even just within the portal, the 
> user needs to be able to specify units in ADQL.
> Also, it is not clear that the portal will know every place that a query 
> will go.  I can imagine a not too complicated query that first needs to 
> go out to the grid for computation.  Further breakdown of the query 
> followed by several database queries all happening somewhere in the 
> netherworld of the grid.
> 
> Ed
> 
> 
> Clive Page wrote:
> 
>> 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.
>>
>>
>>  
>>
> 
> 

-- 
Software Engineer
AstroGrid @ ROE
Tel: +44 7901 55 24 66
www.astrogrid.org




More information about the voql mailing list