![]() Attributes Query
When the “Attributes
Query” module is
first activated, it always retrieves the expression used in the last session.
Therefore, if you press Apply you will see the map with the
previously defined restrictions. However, the outcome (map) might not be the
same. Notice that applying a spatial query or a grouping before applying the
attributes restrictions does not produce the same outcome as if you do it on
the reverse order. The Query interface
utilizes two logical operators .AND. e .OR., and the following comparison
operators: = equal to; Creating a Query Expression
To make it easier for the
user, the "Attributes Query"
window provides, besides the operators, two lists (Attributes and Values) and
a field where you can see the expression which is being formulated (Logical
Expression). NOTE: If you want to see the values for
a specific attribute, choose it form the list and press Show.
The Attributes Query
module is activated from the "Visualizing Objects" interface
which shows a list with all object categories existent on the Information
Layer (IL). It is recommended to have only one object category per IL. However,
if there is more than one, you should double click on the one you wish to
perform the query.
NOTE: Before executing the Query, it
is possible to fix the equation, canceling the last input or the whole
equation, by clicking on the Cancelbutton.
Query Example Observe a Query performed
over the districts in the city of CG000002->INCOME>=
5 .AND. CG000002->FAIRS = 2. On the left side of
"->" we have the name of the table and on the right side we have
the attribute name belonging to this table. On the example above all
Attributes belong to the CG000002 table and the Attributes areINCOME
and FAIRS. The boolean operator .AND. restricts even more the
condition since the result will depend on the districts satisfying both
conditions. The expression can be
interpreted as follows: "which
districts have the income greater than or equal to 5 and exactly 2 fairs".
The outcome of this Query is shown on the figure below. This same result is
also shown at the Table interface, where the objects that satisfy the query
are highlighted. Saving, Loading or Canceling a Query Expression
Every Query expression
can be re-applied since it has been previously stored in disk. Clicking on Save...,
the window "Save Expression"
is presented and the user must type in a name for the expression to be saved
and then press Apply. Clicking on Load...,
the window "Load Expression"
is presented and the user must choose the name of the expression he wishes to
load and then press Apply. See some more the details
at
saving and loading expressions.
Database Query ![]() |