Transcript Document

Attribute databases
GIS Definition Diagram
Query Results
Query Results
How do attribute databases allow analysis?
GIS can be used to query the data and and answer questions.
What is an attribute database?
- data grouped together or related to a common subject
that can be analyzed.
ie. Attribute data on fire hydrants: id#, address, year installed,
diameter, year flushed, color, type, etc.
Attribute table consists of:
Record- One row in the table that shows values of a group of related items.
All records are the same length (ie. Owner records are all Character & 38 characters wide)
Field- Defines where a particular type of data can be found. Also referred to as
a variable or column.
- A Key field is a designated field used to locate or sort records.
- There be more than one key field.
- There is usually a unique key field (no duplicate values). What is the unique key field in
this example?
Parcel or Property table
-Databases have developed / evolved to manage and query data
ASCII, hierarchical, network, relational, object-oriented
-Most GIS software use relational databases
-What is a relational database?
Tables of data items that are linked and logically related.
Consist of a DBMS (Data Base Management System)
that is used to manage and manipulate the data.
Relational database example – consisting of 5 tables
How does a GIS use relational databases?
- GIS can perform data selection through searches (queries)
- Computer language used to ask the questions: SQL- Structured Query Language
User selects menu options to generate the SQL
(User does not need to type or understand the actual SQL syntax)
Queries can be performed on single or multiple tables using one or more fields
Simple selection (query) from one table:
Simple selection (query) from one table:
Queries can be more complex using more than one table:
How could I generate a student
list for a course?
Generating a student list for a course from multiple tables:
Result is
Query Table
This procedure is known as a relational join: two or more tables are linked together by
common fields.
The resulting table is known as a “selection” or “query” table. The query table is a
temporary table- You can save the query table results to a new table, save the query
syntax, or discard the table.
Attribute queries have been used in traditional
relational databases for years.
Examples of relational database software packages are:
dBase, Oracle, Access, MySQL (web), PostgreSQL (web)
GIS packages can link directly to the relational db:
In MapInfo, look under File> Open DBMS table
What makes GIS packages unique in handling relational
Databases is the ability to
Any db package can perform attribute queries, but GIS allows an
additional step , by linking query results to the spatial objects on the map.
Select attribute record in table.
The spatial object is highlighted on map.
Select the spatial object on map.
The attribute record in table is highlighted.
To query data in MapInfo, use Query> Select for simple selections
Or Query> SQL Select for more complex selections.
Shown below is the Query> SQL Select screen from MapInfo with a
brief description of the options.