Query Interfaces - Clive Page - VOQL Working Group - 2003 May 13. What is a query language for? For the VO portal to transfer a query to a remote data service? For power user to enter general query specification, say in a text-box? Simple Queries Simple image access, querying a particular image archive similar to cone-search except specifies box rather than circle Search for observational data sets (raw or semi-processed data) Cone search on specified observation log Results not a table but (often) a compressed TAR file Cone-search of a particular source catalogue Specify position (RA,DEC), radius, maybe other selection constraints using column names Resource Discovery Query For example: locate datasets with data on objects observed in in with sensitivity at least . Hard to handle at present, will be sent to VO Registry Do we need a separate registry query language? Extend Cone-search to multiple catalogues Can be done by Vizier All tables co-located so no network overhead Additional constraints use column names, so laborious to specify for multiple tables Also done by Astrobrowse (but only simple cone-search) Problems: How to specify additional constraints? Column names unknown, can we use UCDs but they are not uniquely mapped to columns? How to handle merger of results from heterogeneous tables? Cross-matching query urrently difficult and therefore rare: Astrobrowse (for a few specific table pairs) JHU Skyquery can match SDSS/2MASS/FIRST (but only for small patches of sky). Query must specify: List of tables to match in some search order Matching criterion (positional errors + some epsilon?) Columns required in the resulting table + distance between matched sources? Search Parameters simple cone search Object name or celestial position Name resolver or Equinox Shape of search area (circle/box/polygon/ellipse) Size of search area (radius/dimensions) Limits on named columns (or UCDs) VMAG between 18.5 and 19.5 Waveband of interest (radio, gamma-ray, etc) List of sites to search General SQL WHERE-clause Output Options Data format Images (FITS/GIF/JPEG) Tables (FITS, HTML, VOTable, CSV, plain text) Which column names (or UCDs) to return Maximum number of rows to return Coordinates to use (Celestial/Galactic) and equinox Ordering: sort ascending/descending by some column Show UCDs and units as well as names Query language considerations Large choice of XML-based query languages Xpath, Xquery, XqueryX, Xupdate, Quilt, XML-QL, XQL, and probably others SQL used by many (not all) current archives Xquery draft W3C standard: has WHERE-clause similar to SQL Needs special function for cone-search For example CONE(ra, dec, radius)