Forming Expressions

Expressions are composed of a combination of data values, operators and functions.

Data values may be specified as constants (literal values), or retrieved from a database. Database values are specified by using the name of the data column. The name must be specified exactly as recorded in the DBMS. Database columns names are case-sensitive, and AREA will refer to a different column than Area.

Many simple DBMS store column names in upper case, and some allow mixed upper and lower case. Unfortunately some display column names with a different capitalization than is actually used to store the data. Care must be taken to identify columns correctly.

Data base values come from the data base that is being queried or summarized. In most cases it will be obvious which table is being queried. Some tables are dynamic, in that they can be queried by planning period. In most cases the context determines which time period is being queried. The query language provided functions that identify planning period or year in the future that is being queried.

The Matrix Builder is derives its data base values from the input forest inventory. In the first phase as the Matrix Builder is gathering fragments it processes the expressions in the <input> and <define> elements and values are read directly from the forest inventory file. The Matrix Builder uses these values to build an internal data base table of polygon characteristics. This internal table is then used during the track building phase of processing, and the expressions in <select>, <attribute>, <expression> and <treatment> elements can only refer to these defined columns.