| Version 1.9 Build 1556
|
|
Next: TaQL Commands
Up: NOTE 199 - Table Query Language
Previous: Contents
The Table Query Language (TaQL, rhymes with bagel (though many people
pronounce it as tackle)) makes it possible to select
rows from an arbitrary table based on the contents of its
columns and keywords. It supports arbitrary complex
expressions including extended regular expressions and many functions.
TaQL also makes sorting and column selection possible.
Furthermore TaQL has commands to create a table and to modify data
in a table.
TaQL is modeled after SQL and contains most of SQL's functionality.
The most important features of TaQL different from SQL are:
- The result of a SELECT is not ASCII output. Instead it always
creates another table (either temporary or persistent). Usually this
is a so-called reference table, but if the select column list contains
expressions, it is a plain table.
A reference table is a table that can be used as any other table,
but it does not contain data. Instead it contains references to the
rows and columns in the original table. Thus modifying data in a
reference table means that effectively the data in the original
table are modified.
- Any operand can be a scalar or an N-dimensional array.
Many reduction functions can be applied to arrays.
- A very rich set of mathematical functions.
- Support of various types of patterns/regular expressions.
- Specific operators and functions for cone searching
(i.e. spatial searching with a search radius).
- An advanced way of specifying intervals.
- No support of indices, thus always a linear search is done.
This is, however, very fast, even for very large tables.
- Joins are not supported yet.
- In the SELECT command GROUPBY and HAVING are not supported yet.
- The CALC command exists to
calculate an arbitrary expression (including subqueries) on a
table. This can be useful to derive values from a table (e.g. the
number of flags set in a measurement set). It can even be used as a
desk calculator.
The first sections of this document explain the syntax and show the options.
The last sections show the interface to TaQL using Glish or C++.
The Glish interface makes it possible to embed Glish
variables and expressions in a TaQL command.
Next: TaQL Commands
Up: NOTE 199 - Table Query Language
Previous: Contents
  Contents
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15