Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh...
Transcript of Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh...
![Page 1: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/1.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Working with ADQL
Astronomy Data Query Language
![Page 2: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/2.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Topcat
Aladin
The problem
Different platforms
Different languages
Different formats
![Page 3: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/3.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Topcat
Aladin
Theabstraction
The data
![Page 4: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/4.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Database Database
Database Database
Topcat
Aladin
VirtualObservatory
Registry
TAP
TAP
TAP
Data discoveryRegistry
Data accessTable Access Protocol
![Page 5: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/5.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
TAP Database Database
TAP
TAP Database Database
Topcat
Aladin
VirtualObservatory
ADQL
ADQL
ADQL
Astronomy Data Query LanguageSELECT … FROM table WHERE …
![Page 6: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/6.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
TAP Database Database
TAP
TAP Database Database
Topcat
Aladin
VirtualObservatory
ADQL
ADQL
ADQL
Observation CoreData Model
● who● what● when● where
![Page 7: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/7.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Topcat
Aladin
VirtualObservatory
The data
RegistryTable Access Protocol
Astronomy Data Query LanguageObservation Core Data Model
![Page 8: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/8.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Topcat
Aladin
TAPDatabase Database
ADQL
Data provider role
Observation CoreData Model
● tables● columns
● name● type● units● UCD
TAP schema
![Page 9: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/9.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Topcat
Aladin
Software developer
TCP/IPHTTPREST…
JavaSpringHibernateJDBC…
PythonDjangoFlaskWebPy...
PostgreSQLMySQLSQLServerOracle...
TAPADQL
Database Database
![Page 10: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/10.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Topcat
Aladin
IVOA member
Database DatabaseTAP
ADQL
##
AfwfwfFafas Af ju lk
Asf kget hipnd
!?ADQLADQLTAPTAP
![Page 11: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/11.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
OFFSET ?
AfwfwfFafas Af ju lk
Asf kget hipnd
!!
ADQLADQL
OFFSET
SELECT ….FROM ….WHERE ….OFFSET n
Initial proposal andgroup discussion
Sometimesthe complicated ones are easy,and sometimesthe simple ones are hard.
![Page 12: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/12.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
OFFSET
ADQLADQL
SELECT ….FROM ….WHERE ….OFFSET n
Consensus andupdated specification
Optional featuresvs
range of platforms
What do we do if Oracle doesnot support OFFSET
![Page 13: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/13.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Docker containers, providing basic installof each database platform.
A simple platform for experimentingwith ADQL syntax.
https://github.com/ivoa/cosmopterix
GitHub project- contributions welcome
Cosmopterix
Working
● PostgreSQL● MySQL● MariaDB● HSQLDB● Apache Derby● Oracle (*)
Future
● H2● SQLite● SQLServer● Qserv● SpiderEngine● Hadoop
![Page 14: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/14.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
A place to share example ADQL and SQL queries.
Initial goals● Provide source material for ADQL parser tests● Provide source material for ADQL query tests
Medium term goals● Provide reference material for science use cases
Long term goal● Future work on validating the BNF grammar
https://github.com/ivoa/lyonetia
GitHub project- contributions welcome
Lyonetia
ADQLADQL
##
AfwfwfFafas Af ju lk
Asf kget hipnd
!?
![Page 15: Working with ADQL Astronomy Data Query Language · D.Morris Institute for Astronomy, Edinburgh University June 2016 A place to share example ADQL and SQL queries. Initial goals Provide](https://reader034.fdocuments.net/reader034/viewer/2022051810/60188f109a1a3b29a77296b1/html5/thumbnails/15.jpg)
D.MorrisInstitute for Astronomy,Edinburgh UniversityJune 2016
Public GitHub projects.Make a clone, add your changes and send me a pull request.
Lyonetia – ADQL querieshttps://github.com/ivoa/lyonetia
Open to collaboration
Cosmopterix- Docker containershttps://github.com/ivoa/cosmopterix
ADQL-2.1 working drafthttp://www.ivoa.net/documents/ADQL/20160502/index.html
Dave [email protected]
ADQL document - LaTex sourcehttps://volute.g-vo.org/viewvc/volute/trunk/projects/dal/ADQL/