head 1.1; access; symbols; locks http:1.1; strict; comment @# @; expand @b@; 1.1 date 2004.05.25.14.31.18; author YujiSHIRASAKI; state Exp; branches; next ; desc @none @ 1.1 log @Slides on ADQL/s syntax by Yuji SHIRASAKI @ text @ࡱ>     @@=Sh* y,9P|g0mx[MlG~6:)8 I+~ T QbCQ!0$)PCUKSEsj%"A3\{r=ovŀh؝y;y{ovAW0r}zO{ h@@v;b޶R/J۰t=€XX)?[ҵ5㵃pnڸpe?%޵0qvME8&o:28$-QEǨb @@*X ~+Wı.Ze]\61BXMtQrnC_qlݏ6,(gSE#dXpSpD*IN<}?IWY՞OGZOz/ki+t#]ab8:Su)h}t9G fjß>ΕӒ!l9HHD,FmcMG=ʺG˚MoXLk h5O)aiK>i"ȡ={3#kgp|RIJ(}!c_2]w)jQ;n432z^aَkrK/U♔tqI'''Dæ{HZ=z' [>s|,,ֱ%Ig/pA}|{1 'b-I#W$jc*<5Vk%/͓NEP  6.uQBu&7HF|ojwޓym'XvkOi=D:}t=3o5[hNŌr/ҦAY$i}0OߙW _>7iNiA+6؃<Zb N\ZtSI[U}844^3lcXk,%550Xdz f9; "g3<|\Z'.ѻfÝ.|$s {p==$ɗ{3f>i ?AKVV6Kc9dkcH_JW ?k84-A׈~r0ar1jmG6W9^9~)(k{9 2 g[4'ڪ_%*ӽ$zYݔoF֣./,kMu4k}GZi!ؙrǠE/>)}|\j8{*нLY)Fت\ĦMwܒjyy0&–Rj[QV[1blܧ_:lC![}!z?xh?5D@@=LUJRiYZX^5[A/wWx\kl\N7,J e;iCW%$ $ƁvZmhTHEUViJnjZ*S@@3ws_ok{|1gf̵VJVύYfK6*uMJU}RZUR`FN[S?˪pb.j_#!!]S/;+Bm]]i)@@աm:X>~N8aoXڥ ik m,_b5=y!dj/jWfl=eGr=rmgX f,oBԋ8>ą,>|F| .S1ר)j>K| iZzuQک*jڡpw7L٪^N(Nl5mzஷZMw˞XqG]X_hݢ{`>W@@EwZU>eV-n{&} 흆|A;ψ0\߿V` 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y 0D-3 00000 Roman09( )0(Y 0X2 D-3 0fg0 Roman09( )0(Y 0X0DComic Sans MSn09( )0(Y 0XB ` .  @@n?" dd@@  @@@@`` 7['4;zG . _     ( !&'""#$%?"$Sh* y,k$k"$LUJRiYZ%kc $p3f@@3l ʚ;:ʚ;g4idid )0ppp@@ <4!d!d 0:<4dddd 0: <4KdKdHy 0bZ___PPT9<z( ? %)PADQL/s Syntax (Proposal) -- towards unification of ADQL, SIAP, SSAP, SXAP... -- >QG6G05EZ.VYuji SHIRASAKI yuji.shirasaki@@nao.ac.jp National Astronomical Observatory of Japan JVOWWEfb ,Objective of this talkE  What is Lacking in SQLE 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, ...),(2AXE3#   Geometry data type of PostgreSQL!!G(  (7Expressions to specify a region in the Space Coordinate88G$ )?Expressions to specify a region in Spectrum and Time Coordinate@@@@G$ 4#< Observational Data Data TypeEKImagePointer: 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,.... L E3nE E3^EE3#EE3E E3EE3EE3E~ D% ^ *How is the Image Query Described in SQL ? &+)G   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 .l-(7CG3dCUG3C 8$+An example of Architecture for Data Service,,G  ,! Cross match E "  (Select objects in a specified sky region))G$ Cross Match of two CatalogsE  Image Query for Multiple Regions!!G$  )Join between Catalog and Image Data Table**G    Cross Match and Image RequestG$ $.Query to a Spectrum Database by an Object Name//G(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 nmC GC GCGC G%CG3CGCG3 CG3CGCG3CG3C GCG3CG3 CP  S&!Image and Spectrum from Data Cube""G( -"SummaryE &Extension of Data types (minimum req.)''G$  Extension of OperatorsE ! Functions E + Procedure for Data QueryEA Client requests the SkyNode (or Local Registry ?) column metadata for an interested table. The SkyNode (or LR) return a list of  column name ,  data type ,  Unit ,  Associated Coordinate System if any and UCD for each column. 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. The  data type and/or  UCD also provides the types of data (Image, Spectrum, Data Cube, Photon List, ...) searchable with this table. (" PCG3CG3?C G3C G3CG3CG3 CG3C G3 CG3C G3CG3CG3-C G3CG3lCtCa\jm/P1235679:;< = >  ` ` ̙33` 333MMM` ff3333f` f` f` 3>?" dd@@,|?" dd@@   " @@ ` n?" dd@@   @@@@``PR    @@ ` ` p>> (    6(s P  N000 0000n0f_-[   0 v   Z000 0000n0f_-[ ,{ 2 000 ,{ 3 000 ,{ 4 000 ,{ 5 000 .  0dz ``  P*   0 `   R*   0h `   R* H  0޽h ? ̙33  jn0000 0 zP(    00 D   0 P*    00 S  0 R*  d  c $ ?P# 0  0d0 > 0 Z000 0000n0f_-[ ,{ 2 000 ,{ 3 000 ,{ 4 000 ,{ 5 000 .  6@@0  D   0 P*    6T0  S  0 R*  H  0O3i ? ̙33 p(    NpFpF C    n*  R))RR{{  NpFpF k   p*  R))RR{{   ThSpFpF C    n*  R))RR{{   TX SpFpF k  S p*  R))RR{{H  0O3i ? ̙33 6.0(  R  s *   HX0 @@ @@P 0    <0@@@@  0 H  0޽h ? ̙33~ .& (      0|ҭ`@@    <ӭe   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 Search ADQL Image Data Search/Retrieval SIAP Spectrum Data Search/Retrieval SSAP others nothing 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). 2  2[  !  EE3EE3GE3E E  E 3C E  a4,H  0޽h ? ̙33 4N(  4 4  0p̭   4  6,ͭ@@~   H 4 0޽h ? ̙33= h}(  hr h S Dp  R h s * h 0 UExtension of standard SQL (2G6 h 0í` T 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 syntaxF 2SG kG fG f,H h 0޽h ? ̙33,  -(l(  ( (  0X0   +( 0L`0 ( 22 ,( 6@@~  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 <(x,y),r>, 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 typec Z    c AE3QAE3 AE3AE3AE3?AE3A E3AE3AE3AE3AE3AE34AE3%A"!  -( 6h ` xWe can learn from PostgreSQL 2G H ( 0޽h ? ̙33|  , $ p| (  | |  0pl   | 6p / dA 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 typer 26AE3A)G E3AGC4GA%E3AG5AE3A4GE3ASG+E3AbG>C 0 !( | N4  ,( SkyPoint data type)A  | T̎g i  ~(( SkyROI data type)A H | 0޽h ? ̙33\    ` (     0@@0    0T* 4A SpectrumROI data type ( SpectrumRange data type): (100 nm .. 800 nm)  - use  .. operator (like a perl script). [10 keV .. 300 GHz)  - includes 10 keV, excludes 300 GHz. 100 .. 800  - equivalent to [100..800). 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 .. 800 nm) ~  B  - the two data types can be compared. A time region ( DateTimeROI data type): ( 2004-05-20 10:30:00.00 ..  12:00:00.0 )\b 25AE3A+GE3E&G E3AGEAEA*E3AGE3'G)A*E3G  >D   ]  9  T_B ( 6( SpectrumRange data type)A    Td3   4( SpectrumBand data type)(2A     T$i54 2( DateTimeROI data type)A  H  0޽h ? ̙33  PH(     0`     0P  H  0޽h ? ̙33  aY@@$(  pB   HD zpB  HD`   <20     <)``  f `P   #"r`P   <3? 0  http://xxx/getImage?POS=...?...  C   @@`  <3?> 0  http://xxx/getImage?POS=...?...  C   @@`  <?0>  ImagePointer (SIAP?)C$  @@` M <3?0 P  RJPEGC @@` N <t{?   Z  JPEG C @@`2 P <Pɫ?  & R (600nm .. 700nm)*CC4 @@` Q <ѫ?`   \((10,+30),0.2)C @@` R <ӫ3?0> P  RFITSC @@` S <? >   Z  FITS C @@`2 U <?>  & B (400nm .. 500nm)*CC4 @@` V <p?`>   ((10,+20),0.1) *CC @@` W <`?0P>  s ImageEntity  C  @@` X <? >  TFormatC @@` Z <h? >  t SpectrumBand  C  @@` [ <?`>  URegion C @@``B \ 0o ?`PZB ] s *1 ?`> P> ZB ^ s *1 ?` P `B ` 0o ?` P `B a 0o ?`` ZB b s *1 ? ZB c s *1 ?  ZB e s *1 ? `B f 0o ?PP ZB  s *1 ?00   6x@@~8 `  |select SpectrumBand, ImageEntity from optImage where Region = (( ICRS , 10, +20), 0.1) and Format= FITS and (100nm .. 1000nm) ~ SpectrumBand A EA EA EAE AE!A E   )   6)0 f Nsearch condition columns(2A  6<-0`f B data columns (2 AR   s *P l\p R  s * rb H  0޽h ? ̙33 ;  ::0]J:(  LB  c $D   0select image from imageService where Region = (( ICRS , 10, +20), 0.1) and Format= FITS and (300nm .. 650nm) ~ Spectrum and observers =  Hubble  CG3C#GCGCGGCGP1*RB  s *D RB  s *D  RB  s *D  RB  s *D 0 08 p  p  ZB  s *Dp p TB  c $Dp  Z8 ` 0 TB  c $DTB  c $DZB  s *D`LB  c $Dp 0 p LB  c $D p RB  s *D RB  s *DP@@pRB  s *DpRB @@ s *DppRB @@ s *D@@0 @@RB @@ s *D@@  @@  Bh P G Search Result(2E3D  0,mp  region = (( ICRS , 10, +20), 0.1 deg) format= FITS spectrum= B ,  V G GC 6RB  s *D    0(q v@@file name of observer =  Hubble ! 2!C  0t"2 2tableName =  dataService  2C$  RB @@ s *D@@  0xP B FITS archive  C  6|`  Pspectrum extraction engineC  s *<@@ `5 pspectrum --------------------  B (400nm..500nm)  V (500nm..600nm)  R (600nm..700nm)0 226UCt#  s *̉g ` r&format --------------------- FITS JPEG0 22 'CRB  s *D 0 RB  s *DP 0 H  0޽h ? ̙33  C ;   (     0`    0Tt XhXmatch (table1, table2.(ra, dec), !table3) < presicion1 and (table1, table4) < precision2i iA 0  0 ` 2Where Xmatch(table1, table2, !table3) < presicion3 3Ab   0&@@F YIVOA SkyNode Interface Version 0.7.4 proposes the following construct for cross matching:Z 2ZA Mxx   000  4My 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. 2A,>Fxx  0 <@@ , So, I propose to add the following  XMATCH clause to the select command or to use distance() function for a simple cross matching purpose: 2A$bxxH  0޽h ? ̙33y )!d(  dr d S hp  R d s * d 0@@ MExamples of Usage (2G6H d 0޽h ? ̙33w  '   8 (  8 8  00  > 8 0,< p  select a.* from Tab a where Region( Circle J2000 19.5  36.7 0.02 )4H !AE!A| 8 0P select a.* from Tab a where (( ICRS , 19.5,  36.7), 0.02 deg) ~ (a.ra, a.dec)R RA># 8 6@@~  4The following query is from ADQL WD Version 0.7.4.  Region should be compared with  point , but omitted.... n nEN  8 6`@@~  pIt 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. 2Av9  8 6@@~ gSelect objects located inside a circle centered at RA=19.5deg Dec=-36.7 (ICRS) with radius 0.02 degree.h hE,9 V  8 H( Ll b(( ICRS , 19.5,  36.7), 0.02 deg) ~ (a.ra, a.dec)2(2A>   8 Hm :S  LRegion( Circle J2000 19.5  36.7 0.02 )*'(E!AH 8 0޽h ? ̙33  T )(  T T  0H0   T 0l  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  AEAEAEAEAEAEA EA E,AE3AEAEAE3EAEAEAEAEA     T 6䥩@@~@@` )Use Distance() function or Xmatch Clause.* 2*A  T H쩩p0V  I1Distance((a.ra, a.dec), (b.ra, b.dec)) < 5 arcsec2(EAEAEAEAEAZ  T 6 d  Bselect 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  AEAEAEAEAEAEAEAEAEA EA EA E,AE3AE3AE3AEAE*AL         T B,٩0 ?xmatch (a, b.(ra, dec), !c) < 5.0 arcsec and (a,d) < 20 arcsecP@@AEAE*AZ  T 0  L Simple Cross Match 2E T 0<* P  N Advanced Cross Match 2EH T 0޽h ? ̙33 ld P(  P P  060   P 08@@  ~ZSELECT 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 .. 1000 nm) ~ spectrumBand and obsDate = [ 2002-03-23 ..  2004-05-18 ]h. A EA E A EA EAE3kAE3AE3AE3A EAE3AEAE3 A    ! P 6XSJ F xQuery 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 SIAPHfDF7A CCL4 H !| P 0a0 PZ If you know default coordinate system and unit used in this table, you can omit  ICRS and  deg a 2aGQ x  P 0f 0   If you know band name stored in this table, you can explicitly specify as  spectrumBand =  R  _ 2_GK   P 0|j P zNote that  expression IN (list) is a standard SQL predicate.> 2>C  P Tnq |regionSky IN (8 EAE3 J  P Ts % p(( ICRS , 19.5,  36.7), 0.02 deg), ((23.5,-13.0), 0.02),99A1 P Tx  s/((223.5,+23.0), 0.05) , ((123.5,+43.0), 0.07) )(0.AE3 P T|^.D s imagePointer(A E H P 0޽h ? ̙33 4,$(  $ $  0tZ   $ 6   tselect 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) AEAEA EA EAEAE3 AE3A EAE3 AE3"AE3AEAEA       $ 0D  z  [!Region selection for catalog data" 2"G3^B  $ 6D3 ` D   $ 0 R _Query Result (VOTable) cat.ra cat.dec img.ImageEntity ---------------------------------------- 271.0 -1.50 FITS 271.2 -1.48 FITS 270.0 -1.51 FITS: 2# )(NAP  wR  $ s *x HR  $ s * R $ s * pRB $ s *Dh  RB $ s *DX RB $ s *DH  $ B( ,img.regionSky = ((cat.ra, cat.dec), 1.0 deg)- 2A EAE3AEAE AH    $ H% Ptable join condition (2G3RB $@@ s *D3r:N $ 0H2>D vSelect objects located in a circle region centered at ra=270 and dec=-1.5 with 1 deg radius and get their FITS images.w 2wA,6 3??H $ 0޽h ? ̙33 {s , (  , ,  0Y<   , 6f TD F select optCat.ra, optCat.dec, xCat.ra, xCat.dec, optImage.Image, xImage.Image from optCat, xCat, optImage, xImage where (( ICRS , 270.0 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 z #CG CGCGCGCG CGCGCGCGCG:CG CGCG3CG CG CG CGCGCG3 CG3 C GCG3 CG CGCG3C GCG3 CG CGCG3 CGCG3CG3CGCG3C    $    , 0ip *(2d , 0D<4___PPT9 "Select objects located in a circle region centered at ra=270 and dec=-1.5 with 0.2 deg radius from optical catalog. Identify X-ray counter part for each selected object with 5 arcsec precision. Get FITS images of 10 radius size from optical and X-ray image data service. 2C>6 mZ_?@@` , TP 5U  d(( ICRS , 270.0 deg, -1.5 deg), 0.2 deg) ~ (optCat.ra, optCat.dec)ZC3CG CGCb$_ , Tг T  ADistance((optCat.ra, optCat.dec), (xCat.ra, xCat.dec)) < 5 arcsecBG CG CG CGCGCG3 C  , T è Y  w9optImage.regionSky = ((optCat.ra, optCat.dec), 10 arcsec):(# C GCG3 CG CGC~  , TϨ %^ s7xImage.regionSky = ((optCat.ra, optCat.dec), 10 arcsec)8C GCG3 CG CGC~  , <ۨ a  _(1)G3 , <y |`  _(2)G3 , <xv ]  _(3)G3 , <0~ /e W(3)G3H , 0޽h ? ̙33  l/(  l l  0,/``   l  63@@~0     l 00  9Query Result (VOTable) spe.ObjectName spe.Spectrum ---------------------------------------- Crab Nubula FITS Vega FITS 3C279 FITS: 2 )(-AP8 R l s *@@ R l s * R l s * `RB  l s *D`  RB  l s *D8  RB  l s *D p>  l T#0 $ \ObjectName IN ( Crab Nebula ,  Vega ,  3C273 )(/ E%A % l T0  @@Spectrum  EH l 0޽h ? ̙33 5-t(  t t  030 3  t 031 Select ImagePointer from ALMADataCube where SkyRegion = (( ICRS , 12:23:12.3, +21:30:43), 0.1 deg) and SpectrumRegion = (100 GHz .. 800 GHz) A EA EA EAE3,AE3AEAE3Ab   'v t 03 t 3Query Result ImagePointer -------------------- SIAP: 2 <4A, R  t s *p @@^B t 6D   t 03L  "Select SpectrumPointer from ALMADataCube where SkyRegion = (( ICRS , 12:23:12.3, +21:30:43), 0.01 deg) and SpectrumRegion = (100 GHz .. 120 GHz) AEA EA EAE3-AE3AEAE3Ab  (v  t 03 `t 6Query Result SpectrumPointer -------------------- SSAP: 2 <7A, F `8  t   t B?CPDEF?>IP @@`q& Z2 t s *` 8 Z2 t s *P0 R  t s * ^B t 6D @@  t 0l3' ^ WHERE clause specifies a sub data cube and  ImagePointer , which has an  Image data type, describe the way of projection. ~ 2~G"- D t 0  USame for a photon list database (2 Ah t 06   SpectrumPointer , which has an  Spectrum data type, describe the way of projection. W 2WGG| t Tl q uW lSkyRegion = (( ICRS , 12:23:12.3, +21:30:43), 0.1 deg)D7 EAE3,A$ #K t Tw )and SpectrumRegion = (100 GHz .. 120 GHz)`*E3AEAE3A~ t T:   nSkyRegion = (( ICRS , 12:23:12.3, +21:30:43), 0.01 deg)D8 EAE3-A$ $K t TA '  )and SpectrumRegion = (100 GHz .. 800 GHz)`*E3AEAE3A t T%@@0& ^ ImagePointer  E  t T):$  [SpectrumPointer(E H t 0޽h ? ̙33  >(     0K0@@ 0 z  0M0 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) < precisionV< 2 26 2<EAE3AE3A E3AE3 A E3AE3AE3MAE3A6E3 ? ?H  0޽h ? ̙33 X<(  X X  03P 3 x X <A ??W[ H X 0޽h ? ̙33 \6(  \x \ <A z??\l  z~ \ s *3p 3 H \ 0޽h ? ̙33 h`p` (  ` `  0z3@@ 3  ` 0 }30P ( 2 ` 0\30 D 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])( 2,A GC GCG A GGCGCGCGCGCGC GCGCGC GC GCGCGC GC GC GC GCGC GC GC GC GC GC GC GC G C GC GCGCGCGC GCG C GC GCGCGCG C GC GCGC GCG C GC GC,                  H ` 0޽h ? ̙33 `X(     00p 0   s * c3~x 0 "p`PpH  0޽h ? ̙332 0 @@(  ^  S P#  0  c $80>  0 xBI would like to talk about proposed ADQL syntax of String version.$H  0O3i ? ̙33_ 0 (  ^  S P#  S  c $PS>  S KThe objective of this proposal is to establish a unified query language that can be applied not only the Catalog data but also the observational data such as Image, Spectrum, Data Cube, Photon list, and so on. The Current situation is that for Catalog query ADQL is used, and for the image SIAP is used for searching and retrival > H  0O3i ? ̙33  0 ld(  ^  S P#  S^  c $2S>  S OK, then what is lacking in the standard SQL for using astronomical database ? I have listed three major concerns here. One is the way ... Second is the way to do a cross matching of the separate catalogs. The cross match is a kind of table join, but not a simple join. we must consider the error of the coordinates and sometimes we might consider the brightness too. The most crucial thing is ... So we will discuss how to extend the standard SQL to incorporate those things. H  0O3i ? ̙33A 0 (  ^  S P#  S  c $d 3>  S QHere I summarized the extensions that we introduced to the specification of JVOQL version 2. I will skip the first two things, this was already explained at Cambridge last year. Today, I would like to talk about the extension on data type introduced to describe the region in the Sky, Spectrum, and Time coordinate and Observation data.MH  0O3i ? ̙33e 0 %(  ^  S P#  S  c $=S>  S QAs many people here knows, in PostgreSQL and probably in the other DBMSs too, the geometry data type is introduced, although it is not a standard of SQL specification. Here I will summarize such extension introduced in PostgreSQL. There are several sub data types of the geometry data type, such as Point, Box, Polygon and Circle. >  iH  0O3i ? ̙33 0 ph(  ^  S P#  Sb  c $HS>  S Following the PostgreSQL, I would like to propose several new data types and their expression. First is the  SkyPoint data type which represents a point in the Sky coordinate. The expression is like this, first argument specify the coordinate system and second and third arguments specify the angular coordinate. The first arguments can be omitted, in that case the coordinate system used in the data base is used.  Sexagecimal expression is also supported. > U- "H  0O3i ? ̙33 0 `O(  ^  S P#  S  c $pS>  S EHere is an example for multiple regions query. This query is an image query, because image data type is specified in the select list. Multiple regions can be specified using IN predicate of SQL syntax. Restriction on spectrumBand and observation time is also specified.  *H  0O3i ? ̙33- 0 p}(  ^  S P#  S  c $laS>  S s_This is an example showing how catalog and image data table is joined . The image data is now eH  0O3i ? ̙33& 0  v(  X  C P#  S  S hSS>  S xdWe introduced sky region data type, so it is natural to introduce the region data type also for H  0O3i ? ̙33`# 0  0(  X  C P#  S  S  ZS>  S We defined  Observational Data data type. First is the  Image data data type H  0O3i ? ̙339 0 @@(  X  C P#  S  S P_S>  S USQL is a language for dealing with the relational data base. So, if the structure of image data base is represented by table structure, it is easy to write a query in SQL. So assume a virtual data table which has an image columns. The content of the image column is any image for all possigl location, size, shape, spectrum band, and so on.1H  0O3i ? ̙33, $ 0   P| (  X  C P#  S   S jS>  S ~  Here is an example of architecture for image data service. This image service has a virtual table named imageService and the table has 9 columns. The first three columns are region data type for Sky, spectrum, time coordinate. The next three are metadata keyword, next two is the image data columns. SIAP columns contains SIAP expression for corresponding image, and image column contains Image data itself. The last column contains the format of returned image. Now consider this SQL. This SQL is requesting image column. The data type of image columns is ImageEntity, so requesting the entity of image data. The format is specified as  FITS . The region of interest is specified by Region column and spectrum column like this. Also the condition related with FITS keyword is described. This virtual table is implemented by several existing tables. Meta data table contains meta data for FITS keyword. region table may contains default coordinate system, spectrum table contains available band name and its spectrum region. format table contains supported data format. The each condition is tested by an appropriate table, and the result are passed to the image extraction engine. image extraction engine extract requested image from FITS archive and return the result to the user.Pi  H  0O3i ? ̙33`x\ilu3m\Ez$jDJ\M "%Y6Z:aғZ$eRAZ.RHn:h"mHH\mdu(mQP M\hZ9.y$mH[̜{r~oK>3ϱqq qQ̘)/..J'pVHxڊ/ 3-q! BfBؘ~W~כ7^t{'uanP}oǶ驙־+ǿǏ< \QA?{vu)Hfgػe"Y}T57|2}>a.`;x_vw_b{qc}%0_'y{ ]~^3HO}E۸#W7~Ƴ⧟~ L["|.? /_%_rd|rq1p ˈ@@M6kȱpA˫ҵ$]w]뾛)l3lIҵ.q4o}7Hy3Z-Y|13*bؘTB4f@@: 25 F#ĺ W@@IzT{.UWk1p<9=3@@錓p7 B{f[;SmEmK-9zji6!sYpȣ״dO6Մ׃OX.V 8 <<O+F\?2a,R ޠٕ[-?ӭǾ]9k[#V7* W0RRcX,tϗ4GxW_ zK&Rķzo(a:;4pлn3]΁ɗFw{DQ:X'㋧h\%(4PmE͋ Mjд߀jdԸc2eVW}#AI58vC{6D7Ќlٓ۲%:7y۬9gNy$1nØ۵8:[v:@@c7\&&ff33 @@;zK<:9^j <&|~e`3k(K(g0LQzpAڽdo+:az\A 6=tm =wkT>i{˗C3,|׹n$>K6ɍ[Ͷn,;wC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. 2 '--.@@BComic Sans MS $[wdw0- .(2 ntowards unification of)#. . 2 ADQL*+4 . . 2 ,-. . 2 "SIAP) *. . 2 "4,-. . 2 "VSSAP))*. . 2 ",-. . 2 "SXAP(+*. . 2 "... . . 2 "--.--Y-- @@BComic Sans MS #[wdw0- f. 2 3Yuji . f.2  SHIRASAKI   . f. 2 yuji . f. 2 <.- . f.2 G shirasaki  . f. 2 @@-(. f. 2 !naoi. f. 2 d.ac.  . f. 2 jp. f.F2 J"*National Astronomical Observatory of Japan"  !  !  . f. 2 JVO.".--System 0-&TNPP &՜.+,0     8ʂɍ킹 Vjn  Times New Romanlr oSVbN lr oComic Sans MS WfUCMicrosoft Excel [NV[gQADQL/s Syntax (Proposal) -- towards unification of ADQL, SIAP, SSAP, SXAP... -- Objective of this talkWhat is Lacking in SQLPowerPoint v[e[V!Geometry data type of PostgreSQL8Expressions to specify a region in the Space Coordinate@@Expressions to specify a region in Spectrum and Time Coordinate!gObservational Datah Data Type+How is the Image Query Described in SQL ? ,An example of Architecture for Data Service Cross matchPowerPoint v[e[V)Select objects in a specified sky regionCross Match of two Catalogs!Image Query for Multiple Regions*Join between Catalog and Image Data TableCross Match and Image Request/Query to a Spectrum Database by an Object Name"Image and Spectrum from Data CubeSummary'Extension of Data types (minimum req.)Extension of Operators FunctionsProcedure for Data Query gpĂtHgfUC ev[gߍ܂ꂽ OLE T[o[XCh ^Cg _zT}v]Ոl  !"#$%&'()*+,-./0123456789:;<=>?@@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ Root EntrydO)PicturesCurrent UserSummaryInformation(PowerPoint Document( DocumentSummaryInformation8@