3. Logical Queries. In ArcView, a query is a logical statement used to select features or records. A simple query contains a field name, an operation, and a value. In constructing a logical query (e.g., highlight all countries with a birthrate above two per thousand), ArcView 3 provides a query builder tool that relies on carefully constructed independent clauses, in which precise use of punctuation and conjunctions is critical. The procedure typically involves selecting a field from the left column, an operation from the center column, and a value from the right column, thus building a statement in the box below the columns. Users often highlight fields and values without paying attention to the sequence of the phrase being constructed below. Efforts to repair the phrase through typing by hand, rather than selection, are often inaccurate, leading to a signal of “syntax error.” When this happens, novice users try to identify the “single tweak necessary,” even when they may have inappropriately specified logic statements. The recommended approach is always to do as much selection as possible with the mouse and to watch the box being filled in with a text statement. This problem is difficult to remedy without introducing even more opportunities for error. Logical queries can be complex and syntax is critical. Figure 8.14 shows an ArcView 3 logical query window that provides no formal assistance in construction of the query; in this case, the user has single-clicked in the field column at the left, generating the suite of alternative values at right, but there is no firm clue about the nature of the statement desired in the space below. Figure 8.15 shows an ArcView 8 logical query window that operates in a similar fashion but at least provides a modicum of formal assistance with the statement immediately above the box where the query is to be constructed. Contrast these options with a window such as Figure 8.16, in which the user is guided by the window to construct a logical sentence, in this case, “select features of active themes (here, highways) that <<intersect>> the selected features of <<choose: U.S. States>>” (which will generate a selection of highways in Texas). Because logical queries can range from extremely simple to extremely complex, with multiple conditionals and nested elements, attempting to program for simplicity may actually end up introducing confusion or reducing capacity. The ArcView 8 strategy of “beginning the English translation of the sentence” seems a reasonable compromise.

FIGURE 8.14 Logical queries: query window in ArcView 3.

The National Academies | 500 Fifth St. N.W. | Washington, D.C. 20001
Copyright © National Academy of Sciences. All rights reserved.
Terms of Use and Privacy Statement