Lecture 3 Spatial Databases
Lecture 3 Spatial Databases
OUTLINE
Fundamentals of Databases and Attributes
•Database Concepts
•Database Design and Management
•Database Models
•Spatial and Attribute Data
•Basic Table Operations
•Attribute and Spatial Data Query
Database
Concepts
Introduction
Computing
Paradigms
Deposit Retrieve
Users
Dat
a
UP Department of Geodetic Engineering
Training Center for Applied Geodesy and
Photogrammetry
Spatial and
Attribute Data
REVIEW:
A GIS links attribute and spatial data
Attribute
Data
Spatial and Attribute Data in GIS
•Vector data
•Multiple attributes may be
contained in a single
table, if mapping units
remain the same.
•However, table may ID Area Site Owner Date Cost
become too large and 1
unwieldy, and 2
difficult to update as 3
a result. 4
5
6
Spatial and Attribute
Data in GIS
Column = attribute
Sample
Attribute
Table
Row = object
Vector feature
Spatial and Attribute Data in GIS
Databa
se
•Integrated set of data on a particular subject
•Collection of interrelated data stored together with
controlled redundancy to optimally serve one or
more applications
Database
Models
Common Types of DBMS Model
•Flat file
•Hierarchical
•Network
•Relational -
RDBMS
Flat
file
• Contains all the data in a large table
• Spreadsheet
Zoning
1 2
Zoning Owner
Table B
Parcel # Assessed Value
887419 152,000
446397 100,000
Relational DBMS
•Most popular type of DBMS
•Over 95% of data in DBMS is in RDBMS
Name
town Population
Centroid
• How is one entity related to another entity?
E-R Diagram
• Which roads lie on which towns?
Road_id
N Name
town Population
Centroid
Types of Relationships
(Cardinalities)
• Relationship between tables (records in tables)
bldg type
Student Class#
Student Advisor Adv-Room #
# 1022 101-07
1022 Jones 412 1022 143-01
4123 Smith 216 1022 159-02
4123 211-01
4123 211-02
4123 214-01
From Microsoft Knowledge Base Article - 209534
Third Normal
Form
Eliminate Data Not Dependent On Key
Students:
Registration:
Student Advisor Student Class#
# #
1022 Jones 1022 101-07
1022 143-01
4123 Smith
1022 159-02
Faculty:
4123 211-01
Name Room
4123 211-02
Jones 412
4123 214-01
Smith 216
From Microsoft Knowledge Base Article - 209534
Ex: Database Normalization (1)
After join
1 Digislave Tom
1 Qa Quaternary
Alluvium
2 Qa Quaternary
Alluvium
3 Pa Permian Abo
4 Qe Quaternary Eolian
One-to-Many Relates
Symbol Mineral
Pa Feldspar
Pa Feldspar
• Users specify the precision, which is the maximum length of the field, and scale,
which is the maximum number of decimal places.
• DATES - The date data type can store dates, times, or dates and times. The
default format in which the information is presented is mm/dd/yyyy
hh:mm:ss and a specification of AM or PM.
Geodatabase Field Data
Types
• BLOBs - simply some data stored in the geodatabase as a long sequence of
binary numbers.
2. Agricultural harvest =
ATTRIBUTES AND SPATIAL DATA
QUERY
B. QUERYING
Combined Querying
• Individual queries can be combined to identify features that satisfy
two or more spatial and/or aspatial criteria
•Example: “Where are the municipalities in Camiguin
which
have a population greater than 5000?”
• Usually uses Boolean operators (and, or, not)
•Example: “What are the schools located in
Surigao with student population greater than 1000?