TAP information schema

Doug Tody dtody at nrao.edu
Wed Oct 10 15:45:46 PDT 2007


Hi All -

While I think we all agree that TAP 1.0 need only provide a basic TAP
interface and capabilities, we still need to define both of these,
including what "basic metadata" is returned and how it is returned.
Good progress has been made on this and it is not at all clear to me
that agreement can't be reached soon on a basic schema, especially
since the initial round of basic schemas proposed were so similar.
It is highly desirable that whatever we provide with TAP 1.0 be
consistent with what we plan to provide in 1.1 and subsequent versions.
My personal view is that it is unacceptable to have different
mechanisms for metadata delivery for TAP 1.0 and later versions - this
really would represent a political compromise and design-by-committee.

The following is an attempt to merge the common elements of our
various proposals into a new draft schema, omitting anything which
has not been adequately discussed and agreed upon here (e.g., certain
elements of the proposed VODataService schema such as "role", VOTable
features such as arraysize, etc.):

    TABLES
        catalog_name      The name of the catalog containing the table
        schema_name       The name of the schema for the table
        table_name        The name of the table itself
        table_type        The type of the table: TABLE or VIEW
        Description       A description of what the table contains

    COLUMNS
        catalog_name      The name of the catalog containing the table
        schema_name       The name of the schema for the table
        table_name        The name of the table itself
        column_name       The name of the column
        ordinal_position  The position of this column in the table
        is_nullable       Whether this column may hold NULL values
        data_type         The native (SQL) datatype of values in this column
        Votype            The VOTable datatype of values in this column
        Ucd               The UCD describing the column
        Utype             The UTYPE describing the column
        Unit              The unit associated with values in this column
        Width             The character width of the column
        Description       A description of what the column contains

For clarity the fields for which the name is shown as lower case are
taken directly from the SQL information schema, essentially the same
as Pat proposed.  The VO-specific additions have the first character
of the field name capitalized.

In simple cases many of these could be NULL, however to support even
basic ADQL queries or typical applications we probably need at least
this minimal set of metadata.

What we most need to know is, is this basic metadata sufficient to
support YOUR planned initial use-cases for TAP 1.0?  Is anything
critical to support your initial TAP 1.0 applications missing?

For reference the summary of our first round of attempts at a basic
TAP information schema is attached.

	- Doug
-------------- next part --------------
Date: Sat, 6 Oct 2007 16:42:02 -0600 (MDT)
From: Doug Tody <dtody at nrao.edu>
To: Patrick Dowler <patrick.dowler at nrc-cnrc.gc.ca>, Francois Ochsenbein
<francois at vizir.u-strasbg.fr>, Ray Plante <rplante at ncsa.uiuc.edu>, Mark
Taylor <m.b.taylor at bristol.ac.uk>
Cc: dal at ivoa.net
Subject: Re: Sample table description using VOTable

Hi team TAPIS -

I have extracted the important bits of draft TAP information schemas which
we each submitted, and summarize these below to make it easier to compare
each shema (minus the VOTable formatting which is a detail at this point).

There is a lot of overlap, and it would not be difficult to combine these,
if some questions were decided, e.g., 1) follow VOTable or IS conventions
for naming, datatypes, etc.?;  2) should we support the registry view at
this level, e.g., Role, Std? (note Role can also be useful to interpret
standard Views);  3) should we differentiate between PARAM and FIELD at
this level, or consider both to be like a VOTable FIELD (with PARAM being
a VOTable feature)?;  4) include SQL-IS features such as "catalog_name",
"schema_name", etc.?;  5) how to handle nil/nullable?

The NRAO systems are being updated this weekend and email is currently
down, so I have no idea whether this email will actually go out, or
whether anything else TAP-related was posted today.  I will check later
when email is restored to see whether the mail was sent.

        - Doug



DT Schema

    TABLES
        Id              Unique Table ID
        Name            Table name                              (Required)
        Type            Table type (base, view)                 (Required)
        Role            How table is used, e.g., "out"
        Ucd             Can a table actually have a UCD?
        Utype           UTYPE can apply to a table
        Description     Short one line table description


    COLUMNS
        Id              Unique column ID
        TableName       Table to which column belongs           (Required)
        Name            Column name                             (Required)
        Datatype        Datatype (as in VOTable + "string")     (Required)
        Arraysize       Arraysize (as in VOTable)
        ColumnType      Column type (as in VOTable Field, Param)
        Std             Standard column (boolean)
        Value           Value if ColumnType=Param (fixed value)
        Ucd             UCD for column
        Utype           UTYPE for column
        Unit            UNIT for column
        Description     Brief one-line description of column

    Note 1: Role and Std are provided for the registry view
    Note 2: Note that Columns can describe VOTable Param as well as Field


FO Schema

    (VOTable table header(s), plus the following for the schema approach)

    TABLES
        Name            Table name
        Description     Table description

    COLUMNS
        Name            Column label
        Ucd             UCD1_ representation
        Type            Data-type
        Width           Length for strings/blobs
        Unit            Units of the data (controlled)
        Description     Detailed explanation of the column

    Note 1: Here Columns describes only a single table


RP Schema

    TABLES
        Id              Unique ID for the table
        Name            The name of the table
        Ucd             The UCD describing the table
        Utype           The UTYPE describing the table
        Nrows           The number of rows in the table (if static/known)
        Description     A description of what the table contains

    COLUMNS
        table_ID        ID of the table this column belongs to
        Id              Unique ID for the column
        Name            The name of the column
        Ucd             The UCD describing the column
        Utype           The UTYPE describing the column
        Unit            The unit associated with values in this column
        Datatype        The datatype of values in this column
        Arraysize       Number and array "shape" of values in this column
        Precision       The precision description for values in this column
        Width           The number of characters used to encode the value
        Description     A description of what the column contains

    Note 1: A SQL-like query of Columns "where tableName = foo" will not
    work here as an internal ID is used instead of the table name.

    Note 2: Things like ID should not be XML specific, as we may need to
    represent this information in other contexts.


PD Schema

    (This is based on a subset of the SQL information schema rather than
    the VOTable model, with some additions)

    TABLES
        catalog_name    The name of the catalog containing the table
        schema_name     The name of the schema for the table
        table_name      The name of the table itself
        table_type      The type of the table: TABLE or VIEW
        ucd             The UCD describing the table
        utype           The UTYPE describing the table
        description     A description of what the table contains

    COLUMNS
        catalog_name    The name of the catalog containing the table
        schema_name     The name of the schema for the table
        table_name      The name of the table itself
        column_name     The name of the column
        ordinal_position        The position of this column in the table
        is_nullable     Whether this column may hold NULL values
        datatype        The datatype of values in this column
        ucd             The UCD describing the column
        utype           The UTYPE describing the column
        unit            The unit associated with values in this column
        description     A description of what the column contains

    Note 1: Catalog/Schema are included here and may be needed in TAP
    to reference tables in different "databases" (such as a local DBMS
    or a named VOSpace).

    Note 2: Does "datatype" refer to the SQL datatype or the VOTable
    datatype?


More information about the dal mailing list