Query language

A Database structure like DIRA2 is typically used to retrieve the desired data from big catalogues. The query language defines how to formulate the questions.

The query language is a new feature of the version 2 of DIRA. It uses statements that agree with FORTRAN or SQL style logical expressions. If one wants to retrieve from a catalogue all the objects that have a magnitude (field name MAG) between 13.5 and 15.0, one can use a FORTRAN style logical expression like:

MAG .GT. 13.5 .AND. MAG .LT. 15.0

or one can use a SQL style logical expression like :

MAG > 13.5 AND MAG < 15.0

A logical expression is a combination of relational expressions connected by the logical operators (eg. AND, OR, NOT ). A relational expression is simply a statement comparing two quantities (eg: A .LT. B). The two quantities are arithmetic expressions consisting of constants, variables and functions.



Previous page | Next page