ADASS XIIIASP Conference Series, Vol. XXX, 2004
F. Ochsenbein, M. Allen and D. Egret eds.

Astronomical Data Query Language : Simple Query
Protocol for the Virtual Observaroty
Naoki Yasuda1 , Yoshihiko Mizumoto, Masatoshi Ohishi
National Astronomical Observatory of Japan
William O’Mullane, Tamás Budavári, Vivek Haridas, Nolan Li, Tanu
Malik, Alex Szalay
Johns Hopkins University, USA
Martin Hill, Tony Linde, Bob Mann, Clive Page
AstroGrid, UKAbstract. The Astronomical Data Query Language (ADQL) is a proposed standard query language for the interoperability of the International Virtual Observatory. The data servers in the International VirtualObservatory could be searched using an ADQL query. The servers would
return VOTables as a result of the query.

1.

The Virtual Observatory Query Language

Virtual Observatory Query Language (VOQL) is currently under discussion inthe International Virtual Observatory Alliance (IVOA) forum. See
http://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOQL. Current thinking is that
VOQL has 3 layers as depicted below. ADQL and SkyNode constitute layer 1.
VOQL3 SkyXQuery future XML-based query language.
VOQL2 Federation SQL-like query language and federation system i.e. combination of SkyQuery, JVOQL and VO standards.
VOQL1 WebServices ADQL and VOTABLE to exchange information between machines.
2.
2.1.

ADQL, SkyQL, and SkyNode
Astronomical Data Query Language (ADQL)ADQL is the language for expressing queries against tabular data such as catalogs in the Virtual Observatory. The SkyNode (see below) specification proposes
1Institute for Cosmic Ray Research, The University of Tokyo

1

2

Yasuda et al.

a standard way of passing this query. Since ADQL deals with tabular data it isappropriate for the result of such a query to be a Table. VOTable is an adopted
standard of the Virtual Observatory, for providing tabular data. Hence we foresee the minimal requirement on servers that they provide results in VOTable.
Other formats may also be offered by some nodes.
ADQL is passed as an XML document to the Query Interface. ADQL isbased on a subset of SQL plus Region and XMatch. The only SQL command
allowed in ADQL is a “select”. We have adopted SQL like language as a firststep since many astronomical data currently available are tabular data and theyare stored in the relational databases. See the XSD(http://skyservice.pha.jhu.edu/devel/AdqlTranslator/ADQLschema.xsd) and current proposal specification(http://www.ivoa.net/internal/IVOA/IvoaVOQL/ADQL-0.6.pdf) for complete structure of ADQL.
2.2.

SkyQL

SkyQL is a string like representation of ADQL. Semantically SkyQL and ADQL
are identical. Syntactically ADQL is XML and SkyQL is more human readable.
For example, a simple SkyQL likeselect t.*, b.*
fromTab t, Bob b
where t.g <> b.g andRegion(’Circle J2000 12.5 23.0 0.5’)
will be converted to ADQL document of about 70 lines. This is why wemight like a human readable SkyQL as well as the machine readable ADQL.
Conversion between ADQL and SkyQL is automatic and sample converter applications are available at
http://skyservice.pha.jhu.edu/devel/AdqlTranslator/Convertor.aspx andhttp://skyservice.pha.jhu.edu/devel/AdqlTranslator/AdqlToSql.aspx.
2.3.

XMatchCross matching between tables will be supported in Full SkyNode (higher levelSkyNode). The service XMatch() takes an ADQL structure and a set of VOTables. An example of the SkyQL (which would be expressed in ADQL format)
isselect ....
from SDSS:PhotoObj o, EXT:0 my1, EXT:1 my2
where XMatch(o,my1,my2) < 3
Virtual Observatory Portal will be constructed on top of SkyNode’s services to federate multiple data servers. One example of such portal is OpenSkyQuery Portal which is open version (not restricted on Microsoft Technology)
of SkyQuery (http://www.skyquery.net). Further details are given in Budavári(2004).

Astronomical Data Query Language
2.4.

3

SkyNodeAll data servers joining the International Virtual Observatory would implement
a standard IVOA SkyNode Interface based on SOAP (Simple Object AccessProtocol) Web Services. See current proposal specification on
http://www.ivoa.net/internal/IVOA/IvoaVOQL/SkyNodeInterface-0.6.pdf.
The services of IVOA SkyNode are defined as WSDL (Web Services Definition Language) at
http://skyservice.pha.jhu.edu/devel/SkyNode/SkyNode.asmx?wsdl. WSDL definition enables automatic code generation of Web Services e.g. Microsoft .NETor Apache Axis.
Currently two kinds of SkyNodes are proposed based on their features;
Basic and Full. Basic SkyNode is the minimum IVOA SkyNode Interface. Full
SkyNode supports adavanced features like XMatch, QueryCost, Footprint andso on. QueryCost service would take a simple ADQL query to return the object
density per square degree for a set of criteria and Footprint service would takea region specified in the region XML and return a new region which is theintersection of the survey and the given region.
Acknowledgments. This research was supported by Grant-in-aid ”Information Science” carried out by the MEXT (14019092 and 15017289).
References
Budavári et al. 2004, this volume, [P2-18]
Digital Equipment Corporation 1992, Database Language SQL,
http://www.contrib.andrew.cmu.edu/ ~shadow/sql/sql1992.txt

IVOA VOQL Working group, IVOA Astronomical Data Query Language – getlatest from http://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOQLIVOA VOQL Working group, IVOA SkyNode Interface – get latest fromhttp://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOQL