[TAP] data type for column metadata
Arnold Rots
arots at head.cfa.harvard.edu
Tue Mar 24 13:27:31 PDT 2009
This came to be a very confused and convoluted discussion - at least,
I am speaking for myself here.
If you want to know what a particular column expresses, there are a
number of different aspects to it:
What is the data type and precision?
What kind of parameter does it represent?
If it is a coordinate value, what coordinate system does it refer to?
How is it represented?
Where does it fit into the information object?
You can't just sweep them all in one single descriptor because you
will be mixing apples and oranges. Trying to economize on metadata
will inevitably turn into confusion.
For a Timestamp:
What is the data type and precision?
Could be datetime
Or could be a floating point number
What kind of parameter does it represent?
OK, that would be time instant, if we are talking about timestamps
If it is a coordinate value, what coordinate system does it refer to?
The Time Scale (TT, UTC, TAI, GPS, TCG, TDB, TCB, ...)
The Reference Position
If it is relative (elapsed) time, the time zero point
How is it represented?
ISO-8601 (with the CCYY-MM-DD[Thh:mm:ss[.s...]] restriction)
JD
MJD
Elapsed time
Where does it fit into the information object?
E.g., the time a photon was received
or the time the record was recorded
or the time this particualr file was written
This last item may seem rather trivial, but can be a nasty headache,
as many have pointed out already, especially when it comes to spatial
coordinates: the position of an object; or the center of the galaxy it
belongs to; or the center of the field it is found in; or ...
Please try to decide what aspect it is that you are talking about.
- Arnold
Patrick Dowler wrote:
[ Charset ISO-8859-1 unsupported, converting... ]
> On 2009-03-24 09:54:53 Gerard wrote:
> > I have made a table comparing various SQL-like datatypes in the wiki
> > http://www.ivoa.net/cgi-bin/twiki/bin/view/IVOA/GerardLemsonADQLDataTypes.
> > To me it seems that the JDBC types provide a nice list, as Doug also once
> > remarked:
> >
> > BOOLEAN
> > BIGINT
> > BLOB
> > CHAR(P)
> > CLOB
> > DATE
> > DECIMAL(P,S)
> > FLOAT(P)
> > INTEGER
> > NCHAR(P)
> > NUMERIC(P,S)
> > NVARCHAR(P)
> > REAL
> > TIME
> > TIMESTAMP
> > VARCHAR(P)
>
> Thanks Gerard - you are right that the more immediate issue is the type system
> in the TAP metadata. Mapping that to VOTable will be needed, but is not
> fundamental.
>
> When I look at the java.sql.Types class, I also see constants for
>
> DOUBLE - also an ADQL reserved word
> SMALLINT - also an ADQL reserved word
>
> BINARY - not an ADQL reserved word
> VARBINARY - not an ADQL reserved word
>
> Plus we would have to add at least one construct for region, maybe two:
>
> POINT aka coordinate system + coordinates
> REGION aka coordinate system + some shape
>
> I think we need both types because some functions (COORDSYS, COORD1, COORD2)
> take only a POINT as an argument. The other geometric functions are still
> useful if we consider them as utility functions that create these two types
> of things.
>
> For simplicity, we could make a shorter list and avoid some of the intricacies
> (for the first version, anyway). From the above types, I have made lots of
> use of the ones that map to primitive types as well as VARCHAR, VARBINARY,
> and TIMESTAMP. I have never found a good use for the separate TIME and DATE,
> nor the arbitrary precision numeric values and rarely/never use fixed size
> CHAR. So my short-list would include:
>
> BOOLEAN
> INTEGER
> BIGINT
> REAL
> DOUBLE
> TIMESTAMP
> VARCHAR
> VARBINARY
> POINT
> REGION
>
> my 2c,
>
> --
>
> Patrick Dowler
> Tel/T?l: (250) 363-0044
> Canadian Astronomy Data Centre
> National Research Council Canada
> 5071 West Saanich Road
> Victoria, BC V9E 2M7
>
> Centre canadien de donnees astronomiques
> Conseil national de recherches Canada
> 5071, chemin West Saanich
> Victoria (C.-B.) V9E 2M7
>
--------------------------------------------------------------------------
Arnold H. Rots Chandra X-ray Science Center
Smithsonian Astrophysical Observatory tel: +1 617 496 7701
60 Garden Street, MS 67 fax: +1 617 495 7356
Cambridge, MA 02138 arots at head.cfa.harvard.edu
USA http://hea-www.harvard.edu/~arots/
--------------------------------------------------------------------------
More information about the dal
mailing list