Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home

next up previous contents
Next: Calculations on a table Up: NOTE 199 - Table Query Language Previous: Modifying a table

Creating a new table

TaQL can be used to create a new table. The data managers to be used can be given in full detail.

The syntax is:

  CREATE TABLE tablename colspec DMINFO datamans
The columns are defined in the colspec part. If not given, an empty table is created.
Data managers can be defined in the datamans part.

The colspec part can optionally be enclosed in square brackets or parentheses (for SQL compatibility). It is a comma separated list of column specifications. Each specification looks like:

  columnname datatype [NDIM=n, SHAPE=[d1,d2,...],
The possible data type strings are given in section Data Types. The part enclosed in square brackets is optional. Zero or more of these keywords can be used. It makes it possible to define array columns and/or default data manager to be used. The square brackets are optional if only one such keyword is used.
NDIM=n defines if the column contains scalars or arrays. A negative value means a scalar (unless shape is also given). A value 0 means an array of any dimensionality. A positive value means an array with the given dimensionality.
SHAPE=[d1,d2,...] makes it possible to define the exact array shape. If given and if NDIM is positive, they should be consistent.
DMTYPE, DMGROUP, COMMENT have string values, thus quotes have to be used. DMTYPE and DMGROUP are rather specific and are for the expert user.

The dataman part makes it possible for the expert user to define the data managers to be used by columns. It is a comma separated list of data manager specifications looking like the output of the table.getdminfo command in glish. Each specification has to be enclosed in square brackets. For example:

  dminfo [NAME="ISM1",TYPE="IncrementalStMan",COLUMNS=["col1"]],
The case of the keyword names used (e.g. NAME) is important. They have to be given in uppercase. The following keywords can be given:
NAME defines the unique name of the data manager.
TYPE defines the type of data manager.
SPEC is a list of keywords giving the characteristics of the data manager. This is highly data manager type specific.
COLUMNS is a list of column names defining all columns that have to be bound to the data manager.

next up previous contents
Next: Calculations on a table Up: NOTE 199 - Table Query Language Previous: Modifying a table   Contents
Please send questions or comments about AIPS++ to
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page