Monday, March 17, 2014

Lab 3: Multiple Criteria Query

Introduction

 This lab is meant to test students knowledge of attribute and spatial queries. Students will need to write multiple criteria queries to extract specific information from a database. Each query should be written as concisely as possible and return the correct information.


Methods

Boolean operators are used to create logical expressions that relate data together through satisfying combinations of conditions. For this lab, the Boolean operators AND, OR, and IN are used.


 AND - returns records that satisfies both conditions
Figure 1: In this diagram the red section symbolizes the records that satisfy the conditions. A and B symbolize different data sets.




 OR - returns records that satisfies either condition
 Figure 2: In this diagram the red section symbolizes the records that satisfy the conditions. A and B symbolize different data sets. 




IN - returns records that have one of several strings or values inside the parenthesis

EXAMPLE:              "STATE_NAME" IN ('Wisconsin', 'Minnesota')

In this example, all records from Wisconsin or Minnesota will be returned, but none from any other state.

Figure 3: Select by Attributes. The red area indicates the drop down menu to select the layer to use. The blue area indicates the drop down menu to select the selection method, either "Create a new selection" or " Select from current selection." The yellow area lists the fields of the data set and is also where the fields of interest can be chosen when constructing the query. The green area is where the query is entered through a combination of choosing fields from the yellow area, choosing the operators underneath the yellow area, and using the keyboard. For this lab, this green area is where the Boolean expressions are made.


Results
 - First Map -


- Second Map -


 - Third Map -



 - Fourth Map -
 



- Fifth Map -
 
 


No comments:

Post a Comment