\documentclass[11pt,twoside]{article}
\usepackage{adassconf}

\begin{document}

\paperID{P3-10}
%%%% ID=P3-10

\title{Astronomical Data Query Language : Simple Query Protocol for the Virtual Observaroty}
\titlemark{Astronomical Data Query Language}

\author{Naoki Yasuda\altaffilmark{1}, Yoshihiko Mizumoto, Masatoshi Ohishi}
\affil{National Astronomical Observatory of Japan}
\author{William O'Mullane, Tam\'as Budav\'ari, Vivek Haridas, Nolan Li, Tanu Malik, Alex Szalay}
\affil{Johns Hopkins University, USA}
\author{Martin Hill, Tony Linde, Bob Mann, Clive Page}
\affil{AstroGrid, UK}
\altaffiltext{1}{Institute for Cosmic Ray Research, The University of Tokyo}

\contact{Naoki Yasuda}
\email{yasuda@icrr.u-tokyo.ac.jp}

\paindex{Yasuda, N.}
\aindex{Mizumoto, Y.}
\aindex{Ohishi, M.}
\aindex{OMullane@O'Mullane, W.}
\aindex{Budav\'ari, T.}
\aindex{Haridas, V.}
\aindex{Li, N.}
\aindex{Malik, T.}
\aindex{Szalay, A. S.}
\aindex{Hill, M.}
\aindex{Linde, T.}
\aindex{Mann, B.}
\aindex{Page, C. G.}

\authormark{Yasuda et al.}

\keywords{Virtual Observatory, interoperability, databases: query}

\begin{abstract}
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 Virtual Observatory
could be searched using an ADQL query. The servers would return
VOTables as a result of the query.

\end{abstract}

\section{The Virtual Observatory Query Language}

Virtual Observatory Query Language (VOQL) is currently under
discussion in the International Virtual Observatory Alliance (IVOA)
forum. See \\
\htmladdURL{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.

\begin{description}
\item[VOQL3 SkyXQuery] future XML-based query language.
\item[VOQL2 Federation] SQL-like query language and federation 
system i.e. combination of SkyQuery, JVOQL and VO standards.
\item[VOQL1 WebServices] ADQL and VOTABLE to exchange 
information between machines.
\end{description}

\section{ADQL, SkyQL, and SkyNode}

\subsection{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 a standard way of passing this query. Since
ADQL deals with tabular data it is appropriate 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 is
based 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 first step since many astronomical data currently available are
tabular data and they are stored in the relational databases. See the
\htmladdnormallinkfoot{XSD}{http://skyservice.pha.jhu.edu/devel/AdqlTranslator/ADQLschema.xsd} and the current
\htmladdnormallinkfoot{proposal specification}{http://www.ivoa.net/internal/IVOA/IvoaVOQL/ADQL-0.6.pdf} for the complete structure of ADQL.

\subsection{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 like

\tt
\begin{verbatim}
select t.*, b.*
from   Tab t, Bob b
where  t.g <> b.g and
       Region('Circle J2000 12.5 23.0 0.5')
\end{verbatim}

\rm
\noindent

will be converted to ADQL document of about 70 lines. This is why we
might like a human readable SkyQL as well as the machine readable
ADQL. Conversion between ADQL and SkyQL is automatic and sample
converter applications are 
\htmladdnormallinkfoot{available}{http://skyservice.pha.jhu.edu/devel/AdqlTranslator/Convertor.aspx}
\htmladdnormallinkfoot{}{http://skyservice.pha.jhu.edu/devel/AdqlTranslator/AdqlToSql.aspx}.

\subsection{XMatch}

Cross matching between tables will be supported in Full SkyNode
(higher level SkyNode). The service XMatch() takes an ADQL structure
and a set of VOTables. An example of the SkyQL (which would be
expressed in ADQL format) is

\tt
\begin{verbatim}
select ....
  from SDSS:PhotoObj o, EXT:0 my1, EXT:1 my2
  where XMatch(o,my1,my2) < 3
\end{verbatim}

\rm
A Virtual Observatory Portal will be constructed on top of SkyNode's
services to federate multiple data servers. One example of such a portal
is the Open SkyQuery Portal which is an open version (not restricted on
Microsoft Technology) of SkyQuery
(\htmladdURL{http://www.skyquery.net}). Further details are given in
Budav\'ari (2004).

\subsection{SkyNode}

All data servers joining the International Virtual Observatory would
implement a standard IVOA SkyNode Interface based on SOAP (Simple
Object Access Protocol) Web Services. See the current proposal
\htmladdnormallinkfoot{specification}{http://www.ivoa.net/internal/IVOA/IvoaVOQL/SkyNodeInterface-0.6.pdf}.

The services of IVOA \htmladdnormallinkfoot{SkyNode}{http://skyservice.pha.jhu.edu/devel/SkyNode/SkyNode.asmx?wsdl} are defined as WSDL (Web Services
Definition Language). WSDL
definition enables automatic code generation of Web Services
e.g. Microsoft .NET or 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 advanced features like XMatch,
QueryCost, Footprint and so on. The QueryCost service would take a simple
ADQL query to return the object density per square degree for a set of
criteria and the Footprint service would take a region specified in the
region XML and return a new region which is the intersection of the
survey and the given region.

\acknowledgements

This research was supported by Grant-in-aid "Information Science"
carried out by the MEXT (14019092 and 15017289).

\begin{references}

\reference Budav\'ari et al.\ 2004, \adassxiii, \paperref{P2-18}
\reference Digital Equipment Corporation 1992, Database Language SQL, \\ \htmladdURL{http://www.contrib.andrew.cmu.edu/~shadow/sql/sql1992.txt}
\reference IVOA VOQL Working group, IVOA Astronomical Data Query Language -- get latest from \htmladdURL{http://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOQL}
\reference IVOA VOQL Working group, IVOA SkyNode Interface -- get latest from \\ \htmladdURL{http://www.ivoa.net/twiki/bin/view/IVOA/IvoaVOQL}

\end{references}

\end{document}
