Types of Attribute Data Query: Logical Expressions & Set Operations (Especially for GATE-Geospatial 2022)

Get unlimited access to the best preparation resource for CTET/Paper-2 : get questions, notes, tests, video lectures and more- for all subjects of CTET/Paper-2.

Examrace Books on Mapping, GIS, and Remote Sensing prepares you throughly for a wide range of practical applications.

GIS coverage consists of spatial data and attribute data. The two components are linked through the feature ID. GIS package including ARC/INFO use database management system to handle attribute data. Attribute data queries use logical expressions in set operations.

1. Logical Expressions

A simple logical expression contains two operands and a logical operator e. g. , “class” = 2.

Boolean connectors of AND, OR, XOR, and NOT connect two or more expressions in a query statement.

A logical expression consists of one or more logical operators and logical, numeric, or relational operands. The following are logical operators:

Table Content Shows Logical Operations
OperatorExampleMeaning
ANDA . AND. BLogical conjunction: the expression is true if both A and N are true.
ORA. OR. BLogical disjunction (inclusive OR) : the expression is true if either A, B, or both, are true.
NEQVA . NEQV. BLogical inequivalence (exclusive OR) : the expression is true if either A or B is true, but false if both are true.
XORA . XOR. BSame as . NEQV.
EQVA . EQV. BLogical equivalence: the expression is true if both A and B are true, or both are false.
. NOT. ALogical negation: the expression is true if A is false and false if A is true.
. NOT. is a unary operator.

2. Set Operations on Logical Sets

A diagram representing mathematical or logical sets pictorially as circles or closed curves within an enclosing rectangle (the universal set) , common elements of the sets being represented by intersections of the circles:

This Diagram Shows Types of Operations

The shaded portion represents the complement of data subset A (first) , the union of data subsets A and B (middle) , and the intersection of A and B (last) .

This Figure Shows Types of Three Operations Performed 40 Rec …

In given figure, three types of operation may be performed on the subset of 40 records:

  • First total 50 records are given in 40 records are select.
  • Add more records to the subset i.e.. ,
  • Remove records from the subset i.e.. , or
  • Select a smaller subset (20) .

3. Relational Database Query

This Diagram Shows Relational Database Query

The keys relating three dBASE files in MUID and the feature attribute table. The field comname in plantnm. dbf contains the common plant names.

This Table Shows Field Comname in Plantnm. Dbf Contains the C …

4. SQL (Structured Query Language)

SQL stands for Structured Query Language is a standard query language for relational databases. The basic syntax of SQL, with the keywords in bold type, is

Select < attribute list > from < table > where < condition >

The select keyword selects field (s) from a database, the from keyword selects table (s) from a databases, and the where keyword specifies the condition or criteria for the data query.

The example of simple SQL:

select Sale_date from Parcel where PIN = ‘P101’

More SQL:

select Parcel. Sale_date

from Parcel, Owner

where Parcel. PIN = Owner. PIN AND Owner_name = ‘Costello’

select Parcel. Sale_date

from Parcel, Owner

where Parcel. PIN = Owner. PIN AND Owner_name like ‘C %’

select Parcel. Sale_date

from Parcel, Owner

where Parcel. PIN = Owner. PIN AND Owner_name in ( ‘Wang’ , ‘Smith’ , ‘Jones’ )

Developed by: