Introduction To Spatial Databases
Introduction To Spatial Databases
Ú Ú
Ú
Ú
Ú
Ú ! "
Ú # $
%
Ú # Ú
&Ú # '$()
$
&Ú # '$(*&
Ú # +
,
&Ú # !'$(
,
&
Ú # #
=
Learning Objectives (LO)
LO1 : Understand the value of SDBMS
ƥ Application domains
ƥ users
ƥ How is different from a DBMS?
LO2: Understand the concept of spatial databases
LO3: Learn about the Components of SDBMS
Exercise: List two ways you have used spatial data. Which
software did you use to manipulate spatial data?
=
Learning Objectives (LO)
LO1 : Understand the value of SDBMS
LO2: Understand the concept of spatial databases
ƥ What is a SDBMS?
ƥ How is it different from a GIS?
LO3: Learn about the Components of SDBMS
Sections for LO2
Section 1.5 provides an example SDBMS
Section 1.1 and 1.3 compare SDBMS with DBMS and GIS
± #
A SDBMS is a software module that
can work with an underlying DBMS
supports spatial data models, spatial abstract data types (AD_s)
and a query language from which these AD_s are callable
supports spatial indexing, efficient algorithms for processing
spatial operations, and domain specific rules for query
optimization
Example: Oracle Spatial data cartridge, ESRI SDE
can work with Oracle 8i DBMS
Has spatial data types (e.g. polygon), operations (e.g. overlap)
callable from SQL3 query language
Has spatial indices, e.g. R-trees
Consider a spatial dataset with:
County boundary (dashed white line)
Census block - name, area, population,
boundary (dark line)
Water bodies (dark polygons)
Satellite Imagery (gray scale pixels)
+Ú
$
0
y-axis
Census_blocks
1 (0,1) D (1,1)
4
Name Area Population Boundary
2 3
(0,0) B (1,0) x-axis
+$Ú
$%
$
_raditional relational DBMS
Support simple data types, e.g. number, strings, date
Modeling Spatial data types is tedious
Example: Figure 1.4 shows modeling of polygon using numbers
_hree new tables: polygon, edge, points
ƥ Note: Polygon is a polyline where last point and first point are same
A simple unit sqaure represented as 16 rows across 3 tables
Simple spatial operators, e.g. area(), require joining tables
_edious and computationally inefficient
Edge
edge-name endpoint
A 1 Point
A 2 endpoint x-coor y-coor
B 2
1 0 1
B 3
2 0 0
C 3
3 1 0
C 4
4 1 1
D 4
D 1
+Ú
%
File Systems
Relational DBMS
Object-Oriented
Systems (OODBMS)
Object -Relational
ORDBMS
+Ú !
$%
*+
Post-relational DBMS
Support user defined abstract data types
Spatial data types (e.g. polygon) can be added
Choice of post-relational DBMS
Object oriented (OO) DBMS
Object relational (OR) DBMS
A spatial database is a collection of spatial data types, operators,
indices, processing strategies, etc. and can work with many post-
relational DBMS as well as programming languages like Java, Visual
Basic etc.
Ä,
- #
GIS is a software to visualize and analyze spatial data
using spatial analysis functions such as
m _
m
m
!
"
#
GIS uses SDBMS
to store, search, query, share large spatial data sets
Ä,
- #
SDBMS focusses on
Efficient storage, querying, sharing of large spatial datasets
Provides simpler set based query operations
Example operations: search by region, overlay, nearest
neighbor, distance, adjacency, perimeter etc.
Uses spatial indices and query optimization to speedup queries
over large spatial datasets.
SDBMS may be used by applications other than GIS
Astronomy, Genomics, Multimedia information systems, ...
Will one use a GIS or a SDBM to answer the following:
How many neighboring countries does USA have?
Which country has highest number of neighbors?
%&- (
Geographic Information Systems (1980s)
Geographic Information Science (1990s)
Geographic Information Services (2000s)
GIServices
GISystems
GIScience
Chapter Sections
1.5 second half
1.6 ƛ entire section
m
Recall: a SDBMS is a software module that
can work with an underlying DBMS
supports spatial data models, spatial AD_s and a query
language from which these AD_s are callable
supports spatial indexing, algorithms for processing spatial
operations, and domain specific rules for query optimization
Components include
spatial data model, query language, query processing, file
organization and indices, query optimization, etc.
Figure 1.6 shows these components
We discuss each component briefly in chapter 1.6 and in more
detail in later chapters.
$ =%"
+Ú #
Spatial Database
Spatial Application DBMS
Interface to Spatial Application Core Interface to DBMS
Abstract Data
Types Point Line Polygon Space Taxonomy
3
Spatial Query
Interpretation, Languages
Discretization, Spatial Join
Scale/Resolution
Consistency
Algorithms for Spatial
Operations with Cost
Models
MMIS Object-
Networks Relational
Cost Functions Database
Selectivity Evaluation Servers
Spatial Index
Data Volume Access Methods
(with Concurrency
Control)
Bulk Loading
Concurrency Control
Recovery/Backup
CAD
Visualization
Views
Derived Data
./.$
%!
Spatial _axonomy:
multitude of descriptions available to organize space.
_opology models homeomorphic relationships, e.g. overlap
Euclidean space models distance and direction in a plane
Graphs models connectivity, Shortest-Path
Spatial data models
rules to identify identifiable objects and properties of space
Object model help manage identifiable things, e.g. mountains,
cities, land-parcels etc.
Field model help manage continuous and amorphous
phenomenon, e.g. wetlands, satellite imagery, snowfall etc.
More details in chapter 2.
./.01
%=
ƥ Spatial query language
ƥ Spatial data types, e.g. point, linestring, polygon, Ʀ
ƥ Spatial operations, e.g. overlap, distance, nearest neighbor, Ʀ
ƥ Callable from a query language (e.g. SQL3) of underlying DBMS
SELEC_ S.name
FROM Senator S
WHERE S.district.Area() > 300
ƥ Standards
ƥ SQL3 (a.k.a. SQL 1999) is a standard for query languages
ƥ OGIS is a standard for spatial data types and operators
ƥ Both standards enjoy wide support in industry
ƥ More details in chapters 2 and 3
+
1
%
.
1"
2)23
+4
&$
56242
¢-788 95¢
& -
. 9:
;"
2)23
+4
&$
56242 :< : 9 <=+
>
SENATOR
BUSINESS
MBR
A FILTER B
B
Query
Region C C
D D
REFINE
Data Object
+Ú A C
1
%*
3
1
.2"
:
. ¢
-/34
&¢%-/
C&¢-/4
%(
D
$
. *
!
$Ú
.
Ú!
sweep line
(T.xu, T.yu)
S3
y-axis
y-axis
R2
S2 R1 T
R4 R3 (T.xl, T.yl)
S1
x-axis x-axis
(a) (b)
+Ú B R4 S2 S1 R1 S3 R2 R3
(c)
./.45
6
. %
$
.
/
(¢+ Ú Ú8¢
--
./
(
C¢+ Ú Ú8¢%--
.$
$
.(
C
CPU CPU
MAIN MAIN
MEMORY MEMORY
DISK DISK
1 2 3 4 7 8 14 16
5 6 7 8 5 6 13 15
9 10 11 12 2 4 10 12
13 14 15 16 1 3 9 11
(a) (b)
+Ú ÚÚ
(a) (b)
+
xøp x.p x ø p1 p1 , x ø p2 p2 , x
p
p1 p2
.
"/
.:
C(& $%
.:"$
.:
%$
$
.4:
%
(E
.4:
.
A
ABC
e
d
C
B i d e f g h i j
g
f
h
+Ú Ú/: + Ú Ú/4:
./.71
%6
.'$(
,
.
%
$
.
$
(
(
.'$(
,
.
@$(
.
(
.%
.2"
'$(/
2)23
+4
&$
56242 :< : 9 <=+
>
.
,
"
.* ¢ <=+
>-%¢ :< :-
.$"
¢ <=+
>-
././
.
(
((
. $'$(&
&&
(
. $&
&
&$&
&F
.
(
:
$
:
%
.2"
$
.
:$
(
.(
$
.(
C
.8
%
SDBMS is valuable to many important applications
SDBMS is a software module
works with an underlying DBMS
provides spatial AD_s callable from a query language
provides methods for efficient processing of spatial queries
Components of SDBMS include
spatial data model, spatial data types and operators,
spatial query language, processing and optimization
spatial data mining
SDBMS is used to store, query and share spatial data
for GIS as well as other applications