You are on page 1of 31

GIS 300: Principles of

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

• A GIS involves both spatial data and attribute data.


• Spatial data relates to the geometries of spatial features.
• Attribute data describe the characteristics of spatial data.
• The georalational data model stores spatial and attribute data
separately and links the two by the feature ID.
• The object based data model combines both geometries and
attribute into a single file.
• Materials applied in chapter 8 applied to both vector data
models.
• The raster data model presents a different scenario in terms
of data management.
Figure 8.2
As an example of the georelational data model, the soils coverage
uses SOIL-ID to link to the spatial and attribute data.
Figure 8.3
The object-based data model uses the Shape field to store the
geometry of soil polygons. The table therefore contains both
spatial and attribute data.
Value Attribute Table
• An integer raster has a value attribute table, which lists the
cell values and their frequencies (count).
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 in GIS

• Attribute data are stored in tables.


• Table is organized by rows and columns.
• Each row represents a spatial feature.
• Each column describes a characteristic.
• The intersection between row and column shows the value of
a particular characteristic for a particular feature
• A row is called a record
• A column is called a field.
Attribute Data in GIS

• Types of Attribute Tables (two types of attribute tables for


vector data in GIS
1. Feature attribute table
• Has access to the feature geometry
• In case of georelatioal data model, it uses the FID
• In the case of object data model, the feature attribute table has a
field that stores the feature geometry
• Feature attribute table may be the only table needed if data set has
only several attributes. But this is often not the case
• There may be a hundred of attributes need to be stored which may
result in difficult use, update , and many repetitive entries.
Attribute Data in GIS

• Types of Attribute Tables (two types of attribute tables for


vector data in GIS
2. Nonspatial table
• The table does not have direct access to the feature geometry
but has a field linking the table to the feature attribute table.
Attribute Data in GIS

• Types of attribute data


– The data type determines how an attribute is stored in a GIS.
– The data type information is included in the metadata of geospatial
data
– One method for classifying attribute data is by data type. Common
data types are number, text (or character), date, and binary large
object (BLOB).
– Another method is to define attribute data by measurement scale. The
measurement scale concept groups attribute data into:
• nominal, ordinal, interval, and ratio data
Agenda

• 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

P101 Wang 101 Oak St 1-10-98 1.0 1 residential


Chang 200 Maple St
P102 Smith 300 Spruce Rd 10-6-68 3.0 2 commercial
Jones 105 Ash St
P103 Costello 206 Elm St 3-7-97 2.5 2 commercial
P104 Smith 300 Spruce Rd 7-30-78 1.0 1 residential

TABLE 8.2 First Step in Normalization

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
• + - * /

You might also like