ADQL/s Syntax (Proposal) -- towards unification of ADQL, SIAP, SSAP, SXAP... -- Yuji SHIRASAKI National Astronomical Observatory.

Slides:



Advertisements
Similar presentations
Recommendations for a Table Access Protocol Ray Plante, Tamas Budavari, Gretchen Greene, John Goode, Tom McGlynn, Maria Nieto-Santistaban, Alex Szalay,
Advertisements

European Space Astronomy Centre (ESAC) Villafranca del Castillo, MADRID (SPAIN) Aurélien Stébé DALToolKit Ingestor & Server September 2006, Moscow DALToolKit.
VOQL WG Plenary Session Sept 27, 2004 William OMullane for Masatoshi Ohishi.
Yuji Shirasaki National Astronomical Observatory of Japan JVO JVO Publishing/Searchable Registry Implementation Experience IVOA Interoperability Meeting.
September 13, 2004NVO Summer School1 VO Protocols Overview Tom McGlynn NASA/GSFC T HE US N ATIONAL V IRTUAL O BSERVATORY.
September 13, 2004NVO Summer School1 VO Protocols Overview Tom McGlynn NASA/GSFC T HE US N ATIONAL V IRTUAL O BSERVATORY.
6 September 2008NVO Summer School 2008 – Santa Fe1 DAL Clients: Scripting Data Access with Python Ray Plante T HE US N ATIONAL V IRTUAL O BSERVATORY.
9 September 2005NVO Summer School Aspen Astronomical Dataset Query Language (ADQL) Ray Plante T HE US N ATIONAL V IRTUAL O BSERVATORY.
September 7, 2005NVO Summer School1 Building a SkyNode Server Tom McGlynn NASA/GSFC T HE US N ATIONAL V IRTUAL O BSERVATORY.
VO Standards – Catalog Access Tamás Budavári Johns Hopkins University.
Aus-VO Workshop 2003 International Virtual Observatory Alliance effort on Virtual Observatory Query Language Naoki Yasuda (JVO), VOQL WG.
Chapter 4 Joining Multiple Tables
CASDA Virtual Observatory CSIRO ASTRONOMY AND SPACE SCIENCE Arkadi Kosmynin 11 March 2014.
Design and Implementation of JVO SkyNode Yuji SHIRASAKI National Astronomical Observatory of Japan IVOA Small Projects Meeting, 2004 Oct 1.
Introduction to Structured Query Language (SQL)
SXDS database and Japanese Virtual Observatory Yuji Shirasaki and JVO collaborations National Astronomical Observatory of Japan.
Introduction to Oracle9i: SQL1 Basic SQL SELECT Statements.
1 Tom Stephens GSSC/GSFC Database Access and the dataSubselector Tool December 8, 2003 DC1 Kickoff Workshop.
Introduction to Structured Query Language (SQL)
Concepts of Database Management Sixth Edition
ASP.NET Programming with C# and SQL Server First Edition
Astronomical Data Query Language Simple Query Protocol for the Virtual Observatory Naoki Yasuda 1, William O'Mullane 2, Tamas Budavari 2, Vivek Haridas.
VOQL WG Progress Report May 28, 2004 Masatoshi Ohishi.
DateADASS How to Navigate VO Datasets Using VO Protocols Ray Plante (NCSA/UIUC), Thomas McGlynn and Eric Winter NASA/GSFC T HE US N ATIONAL V IRTUAL.
Functions and Demo of Astrogrid 1.1 China-VO Haijun Tian.
Prototype system of the Japanese Virtual Observatory The Japanese Virtual Observatory (JVO) aims at providing easy access to federated astronomical databases.
Chapter 9 Joining Data from Multiple Tables
JVO JVO Portal Japanese Virtual Observatory (JVO) Prototype 2 Masahiro Tanaka, Yuji Shirasaki, Satoshi Honda, Yoshihiko Mizumoto, Masatoshi Ohishi (NAOJ),
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Concepts of Database Management Seventh Edition
Chapter 10: The Data Tier We discuss back-end data storage for Web applications, relational data, and using the MySQL database server for back-end storage.
P Structured Query Language for Virtual Observatory Yuji Shirasaki National Astronomical Observatory of Japan, and Masahiro Tanaka (NAOJ), Satoshi.
Chapter 4Introduction to Oracle9i: SQL1 Chapter 4 Joining Multiple Tables.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
IVOA Interoperalibity JVO Query Language Naoki Yasuda (NAOJ/Japanese VO)
Oct. 1, 2004IVOA Small Projects Meeting1 Development of JVO prototype system and its application to Astrophysics Portal System : M. Tanaka Data Service.
AstroGrid Solar/STP planning meeting Agenda: Helioscope Preparing for Solar-B Time-series viewing application IVOA and time series A PPARC funded project.
Japanese Virtual Observatory Project Abstract : The National Astronomical Observatory of Japan (NAOJ) started the Japanese Virtual Observatory (JVO) project.
Mar 1-3 – DC2 Kickoff Meeting - 1 Tom Stephens GSSC Database Programmer Retrieving, Filtering and Previewing Data.
Database Fundamental & Design by A.Surasit Samaisut Copyrights : All Rights Reserved.
Progress Report of VOQL WG May 15 (Thu) Masatoshi Ohishi (Japan)
The International Virtual Observatory Alliance (IVOA) interoperability in action.
Data Archives: Migration and Maintenance Douglas J. Mink Telescope Data Center Smithsonian Astrophysical Observatory NSF
Japanese Virtual Observatory Project Abstract : The National Astronomical Observatory of Japan (NAOJ) started the Japanese Virtual Observatory (JVO) project.
Workshop on How to Publish Data in VO ESAC, June 25-June DAL (Data Access Layer) protocols Jesus Salgado
UCL DEPARTMENT OF SPACE AND CLIMATE PHYSICS MULLARD SPACE SCIENCE LABORATORY Taverna Plugin VAMDC and HELIO (part of the ‘taverna-astronomy’ edition) Kevin.
Japanese Virtual Observatory (JVO) National Astronomical Observatory of Japan (NAOJ) Contact Address: Demo 1: GRID-based database federation.
12 Oct 2003VO Tutorial, ADASS Strasbourg, Data Access Layer (DAL) Tutorial Doug Tody, National Radio Astronomy Observatory T HE US N ATIONAL V IRTUAL.
NSF DUE ; Wen M. Andrews J. Sargeant Reynolds Community College Richmond, Virginia.
JVO portal service Yuji Shirasaki National Astronomical Observatory of Japan.
European Space Astronomy Centre (ESAC) Villafranca del Castillo, MADRID (SPAIN) Aurélien Stébé DALToolKit Ingestor & Server January 2008, VODay, Sofia.
Publishing Combined Image & Spectral Data Packages Introduction to MEx M. Sierra, J.-C. Malapert, B. Rino VO ESO - Garching Virtual Observatory Info-Workshop.
7 Dec 2009R. J. Hanisch: Astronomy Data Standards CERN 1 Data Standards in Astronomy Dr. Robert J. Hanisch Director, US Virtual Astronomical Observatory.
IVOA Interop, Beijing, China, May IVOA Data Access Layer Working Group Sessions Doug Tody (NRAO/NVO ) Markus Dolensky (ESO/EuroVO) Data Access Layer.
IVOA Small Projects Meeting Application to the science S. Honda, Y. Shirasaki, M. Tanaka and JVO team National Astronomical Observatory of Japan.
IVOA Interop, Beijing, China, May IVOA Data Access Layer Working Group Sessions Doug Tody (NRAO/NVO ) Markus Dolensky (ESO/EuroVO) Data Access Layer.
June 27-29, DC2 Software Workshop - 1 Tom Stephens GSSC Database Programmer GSSC Data Servers for DC2.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
Sept. 2004IVOA Meeting / Pune1 Virtual Observatory Query Language (VOQL) Working Group William O’Mullane For Masatoshi Oishi T HE US N ATIONAL V IRTUAL.
Spatial Searches in the ODM. slide 2 Common Spatial Questions Points in region queries 1.Find all objects in this region 2.Find all “good” objects (not.
Select Complex Queries Database Management Fundamentals LESSON 3.1b.
Relational Databases and SQL The relational model and the most common SQL commands.
Microsoft Office Access 2010 Lab 3
How to use the GALEX SkyNode*
Standard Query Language for VO
Progress Report of VOQL WG
Chapter 8 Advanced SQL.
TAP Standards and Feedback
Google Sky.
Presentation transcript:

ADQL/s Syntax (Proposal) -- towards unification of ADQL, SIAP, SSAP, SXAP Yuji SHIRASAKI National Astronomical Observatory of Japan JVO

Objective of this talk Establish a unified query language used to search for any kinds of Astronomical Data, such as, Catalog, Image, Spectrum, 3D-Data Cube, Photon List, Light Curve,... Current situation – Catalog Data SearchADQL – Image Data Search/RetrievalSIAP – Spectrum Data Search/RetrievalSSAP – othersnothing We should define a master language whose semantics is upward compatible with SIAP and SSAP... I present proposed extensions of SQL syntax (JVOQL V.2) for Astronomical Data Query Language (ADQL/s).

What is Lacking in SQL the way to describe a region in the Space, Spectrum and Time coordinate. the way to describe a catalog cross match condition. the way to search for observational data (Image, Spectrum, Data Cube, Photon List,...)

Extension of standard SQL UCD support in Select list (Skip) Table name Identifier in FROM clause (Skip) Extension on data type to describe the Sky, Spectrum, Time Coordinates and Observation Data. Xmatch syntax

Geometry data type of PostgreSQL Geometry data type is defined in PostgreSQL. Geometry data type has the following sub data type: Point (x,y), Box ((x1,y1), (x2,y2)), Polygon ((x1,y1),...), Circle, etc... Geometry data operators circle ((0,0),2) ~ point (1,1)’ includes box ((0,0),(1,1)) ~= box ((1,1),(0,0)) equals box ((0,0),(2,2)) && box ((0,0),(1,1)) overlap Geometry data function circle(point, double precision) returns circle data type box(point, point) returns box data type We can learn from PostgreSQL

Expressions to specify a region in the Space Coordinate A point in the Sky Coordinate (“SkyPoint” data type): (‘Gala J2000’, 180, 30) –- Galactic coordinate (J2000) in degree (180, 30) -- Coordinate frame is determined by each data service. (‘ICRS’, ‘12:00:00.0’, ‘+30:00:00.0’) –- Equatorial in Sexagecimal A region in the Sky Coordinate (“SkyROI” data type): ((180, 30), 1.0 deg) -- A circle centered at (180, 30) and 1 deg radius. ((180, 30), (181, 31)) -- A rectangle whose coordinate of opposite points are at (180, 30) and (181,31). ((‘ICRS’,10,20), (12,20), (12,22), (10,22)) –- A polygon. Coordinate frame specified in the first point is inherited by the following points. “SkyPoint” and “SkyROI” are sub data types of “Sky” data type (“SkyPoint” data type) (“SkyROI” data type)

Expressions to specify a region in Spectrum and Time Coordinate A SpectrumROI data type (“SpectrumRange” data type): (100 nm nm) –- use “..” operator (like a perl script). [10 keV GHz) –- includes 10 keV, excludes 300 GHz –- equivalent to [ ). Another SpectrumROI type (“SpectrumBand” data type) “B”(400nm..500nm), “V”, “Soft-X”, “Hard-X” –- a band name followed by a spectrum range (full expression). This data type inherits the SpectrumRange data type, so spectrum range should be assigned. (100 nm nm) ~ “B” –- the two data types can be compared. A time region (“DateTimeROI” data type): (‘ :30:00.00’.. ‘12:00:00.0’) (“SpectrumRange” data type) (“SpectrumBand” data type) (“DateTimeROI” data type)

“Observational Data” Data Type ImagePointer: Expression of this data type is a String which describes a URL or SIAP or ID for retrieving the image data. ImageEntity: This data type holds image data itself in any data format like a FITS, JPEG, GIF and so on. SpectrumPointer: Spectrum version of ImagePointer DataCubePointer, PhotonPointer, LightCurvePoiter,....

How is the Image Query Described in SQL ? SQL is a language for relational data base. Assume a virtual data table which has images for all possible location, size, shape, spectrum band, etc... The columns of the virtual data table can be categorized as “search condition column” and “data column”. RegionSpectrumBandFormatImagePointer (SIAP?) ImageEntity ((10,+20),0.1)‘B’ (400nm.. 500nm) ‘FITS’ mage?POS=...?... FITS ((10,+30),0.2)‘R’ (600nm.. 700nm) ‘JPEG’ mage?POS=...?... JPEG select SpectrumBand, ImageEntity from optImage where Region = ((‘ICRS’, 10, +20), 0.1) and Format=‘FITS’ and (100nm nm) ~ SpectrumBand search condition columnsdata columns

An example of Architecture for Data Service column namedata typeUCD regionSkyROICicle... spectrumSpectrumBand... dateDateTimeROI... observersstring... telescopestring... seeingfloat... SIAPImagePointer... imageImageEntity... formatstring... region (‘ICRS’,, ),deg) metadata table image extraction engine Data Service Engine select image from imageService where Region = ((‘ICRS’, 10, +20), 0.1) and Format=‘FITS’ and (300nm.. 650nm) ~ Spectrum and observers = ‘Hubble’ Search Result region = ((‘ICRS’, 10, +20), 0.1 deg) format=‘FITS’ spectrum=‘B’, ’V’ file name of observer = ‘Hubble’ tableName = “dataService” FITS archive spectrum extraction engine spectrum ‘B’(400nm..500nm) ‘V’(500nm..600nm) ‘R’(600nm..700nm) format FITS JPEG

Cross match Xmatch (table1, table2.(ra, dec), !table3) < presicion1 and (table1, table4) < precision2 Where Xmatch(table1, table2, !table3) < presicion IVOA SkyNode Interface Version proposes the following construct for cross matching: My thought, however, is that it is not appropriate to put the Xmatch function(?) at “WHERE” clause, since “WHERE” clause is the place where selection criteria for each selected record is described but this Xmatch function is evaluated from all the records of the coordinate columns. So, I propose to add the following “XMATCH” clause to the select command or to use distance() function for a simple cross matching purpose:

Examples of Usage

Select objects in a specified sky region select a.*fromTab a where Region(‘Circle J – ’) select a.*fromTab a where ((‘ICRS’, 19.5, –36.7), 0.02 deg) ~ (a.ra, a.dec) The following query is from ADQL WD Version “Region” should be compared with “point”, but omitted.... It is obvious which coordinate to be compared if “Tab” has only one set of coordinate columns, but it is not necessary the case, e.g. a cross-idenfitied table might have two sets of coordinate columns. I propose to explicitly specify which coordinate columns is tested. Select objects located inside a circle centered at RA=19.5deg Dec=-36.7 (ICRS) with radius 0.02 degree. ((‘ICRS’, 19.5, –36.7), 0.02 deg) ~ (a.ra, a.dec) Region(‘Circle J – ’)

Cross Match of two Catalogs select a.ra, a.dec, a.mag, b.ra, b.dec, b.flux from OpticalTable a, XrayTable b where ((‘ICRS’, 19.5, –36.7), 0.02 deg) ~ (a.ra, a.dec) and Distance((a.ra, a.dec), (b.ra, b.dec)) < 5 arcsec Use Distance() function or Xmatch Clause. Distance((a.ra, a.dec), (b.ra, b.dec)) < 5 arcsec select a.ra, a.dec, a.mag, b.ra, b.dec, b.flux, c.ra, c.dec, c.flux from OpticalTable a, XrayTable b, RadioTable c where ((‘ICRS’, 19.5, –36.7), 0.02 deg) ~ (a.ra, a.dec) xmatch (a, b.(ra, dec), !c) < 5.0 arcsec and (a,d) < 20 arcsec Simple Cross Match Advanced Cross Match

Image Query for Multiple Regions SELECT regionSky region, spectrumBand band, imagePointer FROM virtualImage WHERE regionSky IN ( ((‘ICRS’, 19.5, –36.7), 0.02 deg), ((23.5,-13.0), 0.02), ((223.5,+23.0), 0.05), ((123.5,+43.0), 0.07) ) and (100 nm nm) ~ spectrumBand and obsDate = [‘ ’.. ’ ’] Query Result (VOTable) region band imagePointer ((‘ICRS’,19.5,-36.7), 0.02deg) ‘B’(400nm..500nm) SIAP ((19.5,-36.7), 0.02) ‘V’(500nm..600nm) SIAP ((19.5,-36.7), 0.02) ‘R’(600nm.700nm) SIAP ((23.5,-13.0), 0.02) ‘R’ SIAP ((223.5,+23.0), 0.05) ‘R’ SIAP ((123.5,+43.0), 0.07) ‘R’ SIAP If you know default coordinate system and unit used in this table, you can omit ‘ICRS’ and ‘deg’ If you know band name stored in this table, you can explicitly specify as “spectrumBand = ‘R’” Note that “expression IN (list)” is a standard SQL predicate. regionSky IN ( ((‘ICRS’, 19.5, –36.7), 0.02 deg), ((23.5,-13.0), 0.02), ((223.5,+23.0), 0.05), ((123.5,+43.0), 0.07) ) imagePointer

Join between Catalog and Image Data Table select cat.ra, cat.dec, img.ImageEntity from ObjectCatalog cat, Image img where img.regionSky = ((cat.ra, cat.dec), 1.0 deg) and img.OutputFormat = “FITS” and ((‘ICRS’, 270.0, -1.5), 0.2 deg) ~ (cat.ra, cat.dec) Region selection for catalog data Query Result (VOTable) cat.ra cat.dec img.ImageEntity FITS FITS FITS img.regionSky = ((cat.ra, cat.dec), 1.0 deg) table join condition Select objects located in a circle region centered at ra=270 and dec=-1.5 with 1 deg radius and get their FITS images.

Cross Match and Image Request select optCat.ra, optCat.dec, xCat.ra, xCat.dec, optImage.Image, xImage.Image from optCat, xCat, optImage, xImage where ((‘ICRS’, deg, -1.5 deg), 0.2 deg) ~ (optCat.ra, optCat.dec) and Distance((optCat.ra, optCat.dec), (xCat.ra, xCat.dec)) < 5 arcsec and optImage.regionSky = ((optCat.ra, optCat.dec), 10 arcsec) and xImage.regionSky = ((optCat.ra, optCat.dec), 10 arcsec) and optImage.FORMAT = “FITS” and xImage.FORMAT = “FITS” 1.Select objects located in a circle region centered at ra=270 and dec=- 1.5 with 0.2 deg radius from optical catalog. 2. Identify X-ray counter part for each selected object with 5 arcsec precision. 3. Get FITS images of 10” radius size from optical and X-ray image data service. ((‘ICRS’, deg, -1.5 deg), 0.2 deg) ~ (optCat.ra, optCat.dec) Distance((optCat.ra, optCat.dec), (xCat.ra, xCat.dec)) < 5 arcsec optImage.regionSky = ((optCat.ra, optCat.dec), 10 arcsec) xImage.regionSky = ((optCat.ra, optCat.dec), 10 arcsec) (1) (2) (3)

Query to a Spectrum Database by an Object Name select ObjectName, Spectrum from OpticalSpectrumTable where ObjectName IN (‘Crab Nebula’, ‘Vega’, ‘3C273’) and Exposure > 300 sec and Format = “FITS” and spectrumRange between 100 nm and 1000 nm Query Result (VOTable) spe.ObjectName spe.Spectrum Crab Nubula FITS VegaFITS 3C279FITS ObjectName IN (‘Crab Nebula’, ‘Vega’, ‘3C273’) Spectrum

Image and Spectrum from Data Cube Select ImagePointer from ALMADataCube where SkyRegion = ((‘ICRS’, 12:23:12.3, +21:30:43), 0.1 deg) and SpectrumRegion = (100 GHz GHz) Query Result ImagePointer SIAP Select SpectrumPointer from ALMADataCube where SkyRegion = ((‘ICRS’, 12:23:12.3, +21:30:43), 0.01 deg) and SpectrumRegion = (100 GHz GHz) Query Result SpectrumPointer SSAP “WHERE” clause specifies a sub data cube and “ImagePointer”, which has an “Image” data type, describe the way of projection. Same for a photon list database “SpectrumPointer”, which has an “Spectrum” data type, describe the way of projection. SkyRegion = ((‘ICRS’, 12:23:12.3, +21:30:43), 0.1 deg) and SpectrumRegion = (100 GHz GHz) SkyRegion = ((‘ICRS’, 12:23:12.3, +21:30:43), 0.01 deg) and SpectrumRegion = (100 GHz GHz) ImagePointer SpectrumPointer

Summary Syntax of ADQL/s is proposed on the basis of SQL extension. New data types (SkyPoint, SkyROI, SpectrumROI...) are introduced to describe a region in the Space, Spectrum and Time coordinate, and their expressions are defined. point -> (“CoordSys”, x, y), circle -> ((x,y), r)... Boolean operators “~” (=includes) and “&&” (=overlap) are introduced to describe the region conditions. A concept of virtual data table is proposed for achieving a query of observational data in SQL. “XMATCH” clause is introduced to describe the cross match conditions. XMatch (table1(ra, dec), table2, !table3) < precision

Extension of Data types (minimum req.)

Extension of Operators

Functions Minimum Requirement for simple cross match. SkyCoordAngle Distance(SkyPoint p1, SkyPoint p2) Optional. SkyPoint SkyPoint(SkyCoordAngle x, SkyCoordAngle y) SkyROI SkyROI(String regionDescription) SkyROICircle SkyROI(SkyPoint p, SkyCoordAngle r) SkyROIBox SkyROI(SkyPoint p, SkyCoordAngle w, SkyCoordAngle h[, SkyCoordAngle PA]) SkyROIPolygon SkyROI(SkyPoint[] p) SpectrumROI SpectrumROI(SpetrumCoord s1, SpectrumCoord s2) SpectrumROI SpectrumROI(SpectrumBand bandName) DateTimeROI DateTimeROI(DateTime d1, DateTime d2) ImagePointer[] ImagePointer(SkyROI region[, SpectrumROI spe][, DateTimeROI d]) SpectrumPointer[] SpectrumPointer(SkyROI region[, SpectrumROI spe][, DateTimeROI d]) PhotonPointer[] PhotonPointer(SkyROI region[, SpectrumROI spe][, DateTimeROI d])

Procedure for Data Query 1.A Client requests the SkyNode (or Local Registry ?) column metadata for an interested table. 2.The SkyNode (or LR) return a list of “column name”, “data type”, “Unit”, “Associated Coordinate System” if any and UCD for each column. 3.The “column name” is used for keyword of data search. The “data type” or “UCD” is used to know supported region search, such as sky, spectrum and time region. 4.The “data type” and/or “UCD” also provides the types of data (Image, Spectrum, Data Cube, Photon List,...) searchable with this table.