Professional Documents
Culture Documents
GIS 300: Principles of Geographic Information Systems: Dr. Nabil Moustafa
GIS 300: Principles of Geographic Information Systems: Dr. Nabil Moustafa
Geographic Information
Systems
Dr. Nabil Moustafa
Attribute Data
Management
Chapter eight
Agenda
• Introduction
• Attribute Data in GIS
• The Relational Model
• Join, Relates, and Relationship Class
• Attribute Data Entry
• Manipulation of Fields and Attribute Data
Introduction
• Introduction
• Attribute Data in GIS
• The Relational Model
• Join, Relates, and Relationship Class
• Attribute Data Entry
• Manipulation of Fields and Attribute Data
The Relational Model
• There are four types of database designs that have been proposed in the
literature:
– Flat file
• contains all data in large table
• Ex: spreadsheet
– Hierarchical
• Organize data at different levels, uses 1:m association between levels
(XML)
– Network
• While the hierarchical database model structures data as a tree of
records, with each record having one parent record and many children,
the network model allows each record to have multiple parent and child
records, forming a generalized graph structure.
Figure 8.6
Four types of
database design: (a)
flat file, (b)
hierarchical, (c)
network, and (d)
relational.
The Relational Model
• Relational database
– Collection of tables
– Primary key (one or more attribute, not null and not unique)
– Foreign key (pk and fk they may not have the same name BUT IN GIS
THEY OFTEN HAVE THE SAME NAME FEATURE ID)
– More easy and flexible than other design
The Relational Model
• Normalization
– Designing a relational database must follow certain rules. An important
rule is called normalization. Normalization is a process of
decomposition, taking a table with all the attribute data and breaking it
down to small tables while maintaining the necessary linkages
between them.
TABLE 8.1 An Unnormalized Table
PIN Owner Owner address Sale date Acres Zone code Zoning
PIN Owner Owner address Sale date Acres Zone code Zoning
P101 Wang 101 Oak St 1-10-98 1.0 1 residential
P101 Chang 200 Maple St 1-10-98 1.0 1 residential
P102 Smith 300 Spruce Rd 10-6-68 3.0 2 commercial
P102 Jones 105 Ash St 10-6-68 3.0 2 commercial
P103 Costello 206 Elm St 3-7-97 2.5 2 commercial
P104 Smith 300 Spruce Rd 7-30-78 1.0 1 residential
Figure 8.7
Separate tables from the second step in normalization.
The keys relating the tables are highlighted.
Figure 8.8
Separate tables after normalization. The keys relating the
tables are highlighted.
Attribute Data in GIS
• Types of re
– A relational database may contain four types of relationships (also
called cardinalities) between tables, or more precisely, between
records in tables:
– one-to-one,
– one-to-many
– many-to-one,
– many-to-many
Figure 8.9
Four types of data relationship
between tables: one-to-one, one-to-
many, many-to-one, and many-to-
many.
Agenda
• Introduction
• Attribute Data in GIS
• The Relational Model
• Join, Relates, and Relationship Class
• Attribute Data Entry
• Manipulation of Fields and Attribute Data
Join, Relates, Relationship
classes
⚫ Two common operations for linking tables
in a relational database are join and relate.
⚫ A join operation brings together two tables
by using a key that is common to both
tables.
⚫ A relate operation temporarily connects
two tables but keeps the tables physically
separate.
Figure 8.10
Primary key and foreign key provide the linkage to join the table
on the right to the feature attribute table on the left.
Figure 8.11
This example of a many-to-one relationship in the SSURGO
database relates three tree species in cotreestomng to the same
soil component in component.
Figure 8.12
This example of a one-to-many relationship in the SSURGO
database relates one soil map unit in mapunit to two soil
components in component.
Agenda
• Introduction
• Attribute Data in GIS
• The Relational Model
• Join, Relates, and Relationship Class
• Attribute Data Entry
• Manipulation of Fields and Attribute Data
Attribute Data Entry
• Field Definition
• Methods of Data Entry
– Already exist (4000 pol, with 50 att.) then import data file into GIS.
– Typing is the only option
• Verification
1. Make sure that attribute data is linked to spatial data (feature ID
should be unique and not null)
2. Verify the accuracy of attribute data (attribute domain method)
• Outdated data
• Data entry errors
Agenda
• Introduction
• Attribute Data in GIS
• The Relational Model
• Join, Relates, and Relationship Class
• Attribute Data Entry
• Manipulation of Fields and Attribute Data
Manipulation of Attribute Data
• Manipulation of attribute data includes
– Adding and deleting fields
– Classification of attribute data
• Create new attribute from existing one
• Ex: reclassifying elevations into groups (>500, 500 to 1000,..)
– Computation of attribute data
• Convert from feet to meters
• + - * /