SPATIAL DATABASES
Concept, Design and Management
A spatial database system may be defined as a database system
that offers spatial data types in its data model and query language,
and supports spatial data types in its implementation, providing at
least spatial indexing and spatial join methods.
Spatial database systems offer the underlying database technology
for geographic information systems and other applications. We
survey data modeling, querying, data structures and algorithms,
and system architecture for such systems. The emphasis is on
describing known technology in a coherent manner, rather than
listing open problems.
Spatial Database Concept
In various fields there is a need to manage geometric, geographic,
or spatial data, which means data related to space. The space of
interest can be, for example, the two-dimensional abstraction of
(parts of) the surface of the earth or a 3d-space representing a
digital terrain model. At least since the advent of relational
database systems there have been attempts to manage such data in
database systems.
Characteristic for the technology emerging to address these needs
is the capability to deal with large collections of relatively simple
geometric objects, for example, a set of 100 000 polygons. Several
terms have been used for database systems offering such support
like pictorial, image, geometric, geographic, or spatial
database system. The terms �pictorial� and �image�
database system arise from the fact that the data to be managed are
often initially captured in the form of digital raster images (e.g.
remote sensing by satellites, or computer tomography in medical
applications).
The term �spatial database system� has become popular during
the last few years, and is associated with a view of a database as
containing sets of objects in space rather than images or pictures
of a space. Indeed, the requirements and techniques for dealing
with objects in space that have identity and well-defined extents,
locations, and relationships are rather different from those for
dealing with raster images.
A spatial database therefore has the following characteristics:
(1) A spatial database system is a database system.
(2) It offers spatial data types (SDTs) in its data model and
query language.
(3) It supports spatial data types in its implementation,
providing at least spatial indexing and efficient algorithms for
spatial join.
Nobody cares about a special purpose system that is not able to
handle all the standard data modeling and querying tasks. Hence a
spatial database system is a full-fledged database system
with additional capabilities for handling spatial data. Therefore
spatial indexing is mandatory. It should also support connecting
objects from different classes through some spatial relationship.
Spatial Database Design
A spatial database includes collections of information about the
spatial location, relationship and shape of topological geographic
features and the data in the form of attributes. The design of the
spatial database is the formal process of analyzing facts about the
real world into a structured model. Database design is
characterized by the following phases: requirement analysis,
logical design and physical design. In other words, you basically
need a plan, a design layout and then the data to complete the
process.
Having a solid well designed spatial database is the key to
performing good Spatial Analysis. The database can be complex
and designed with expensive sophisticated software or can be
merely a simple well organized collection of data that can be
utilized in a geographic form.
Three main categories of spatial modeling functions that can be
applied to geographic features within a GIS are: (1) geometric
models, such as calculating the Euclidean distance between
features, generating buffers, calculating areas and perimeters, and
so on; (2) coincidence models, such as topological overlay; and (3)
adjacency models (path finding, redistricting, and allocation). All
three model categories support operations on spatial data such as
points, lines, polygons, tins, and grids. Functions are organized in
a sequence of steps to derive the desired information for analysis.
Almost all entities of geographic reality have at least a 3-
dimensional spatial character, but not all dimensions may be
needed. E.g. a highway pavement actually has a depth which
might be important, but is not as important as the width, which is
not as important as the length. Representation should be based on
the types of manipulations that might be undertaken. Map-scale of
the source document is important in constraining the level of detail
represented in a database. E.g. on a 1:100,000 map individual
houses or fields are not visible
Steps in database design
1. Conceptual
a. software and hardware independent
b. describes and defines included entities
c. identifies how entities will be represented in the
database
d. i.e. selection of spatial objects - points, lines, areas,
raster cells
e. requires decisions about how real-world dimensionality
and relationships will be represented
f. these can be based on the processing that will be done
on these objects
g. e.g. should a building be represented as an area or a
point?
h. e.g. should highway segments be explicitly linked in the
database?
2. Logical
a. software specific but hardware independent
b. sets out the logical structure of the database elements,
determined by the data base management system used
by the software
3. Physical
a. both hardware and software specific
b. requires consideration of how files will be structured for
access from the disk
Characteristics of a Good Database Design
In order that the GIS database provides the best service it should
be:
o Contemporaneous � the data should be updated regularly
so as to yield information that pertains to the same time-
frame for all its measured variables
o Flexible and extensible so that additional datasets may be
added as necessary for the intended applications
� the categories of information and subcategories
within them should contain all of the data needed to
analyze or model the behavior of the resource using
conventional methods and models
o Positionally accurate � if for example the boundary
between the residential and agricultural land has changed,
this may be incorporated with ease.
o Exactly compatible with other information that may be
overlain with it
o Internally accurate, portraying the nature of phenomena
without error - requires clear definitions of phenomena that
are included
o Readily updated on a regular schedule
o Accessible to whoever needs it
Spatial Database Management
Many factors influence a successful Geographic Information
System (GIS) implementation. None however are more
fundamental than having the right management strategies and
software to implement these. The spatial database is the
foundation by which all data is uniformly created and converted.
But maintaining the integrity and currency of the data is of
fundamental importance. A classic mistake made by many
organizations is thinking that a generic spatial database design will
be sufficient for their needs. That is simply not the case. The
spatial database is the end result of a series of processes that
determine the specific functional requirements for the user and the
key applications. Interoperability of data is also a critical area of
concern in the development of spatial data information systems.
As we move from newly created data to assimilation of all existing
data, a properly designed spatial database is insurance for end user
success. A good spatial database management software package
should be able to:
1. Scale and rotate coordinate values for "best fit" projection
overlays and changes.
2. Convert (interchange) between polygon and grid formats.
3. Permit rapid updating, allowing data changes with relative
ease.
4. Allow for multiple users and multiple interactions between
compatible data bases.
5. Retrieve, transform, and combine data elements efficiently.
6. Search, identify, and route a variety of different data items
and score these values with assigned weighted values, to
facilitate proximity and routing analysis.
7. Perform statistical analysis, such as multivariate regression,
correlations, etc.
8. Overlay one file variable onto another, i.e., map
superpositioning.
9. Measure area, distance, and association between points and
fields.
10. Model and simulate, and formulate predictive scenarios,
in a fashion that allows for direct interactions between the
user group and the computer program.
Spatial Databases Background
Spatial databases provide structures for storage and
analysis of spatial data
Spatial data is comprised of objects in multi-
dimensional space
Storing spatial data in a standard database would
require excessive amounts of space
Queries to retrieve and analyze spatial data from a
standard database would be long and cumbersome
leaving a lot of room for error
Spatial databases provide much more efficient
storage, retrieval, and analysis of spatial data
Types of Data Stored in Spatial Databases
Two-dimensional data examples
– Geographical
– Cartesian coordinates (2-D)
– Networks
– Direction
Three-dimensional data examples
– Weather
– Cartesian coordinates (3-D)
– Topological
– Satellite images
Spatial Databases Uses and Users
Three types of uses
– Manage spatial data
– Analyze spatial data
– High level utilization
A few examples of users
– Transportation agency tracking projects
– Insurance risk manager considering location risk
profiles
– Doctor comparing Magnetic Resonance Images
(MRIs)
– Emergency response determining quickest route to
victim
– Mobile phone companies tracking phone usage
SDBMS Three-layer Structure
SDBMS works with a spatial application at the front
end and a DBMS at the back end
SDBMS has three layers:
– Interface to spatial application
– Core spatial functionality
Interface to DBMS
Core Spatial
Functionality
Interface to spatial application
Spatial application Taxonomy Interface to DBMS
DBMS
Data types
Operations
Spatial Query Language
Number of specialized adaptations of SQL
– Spatial query language
– Temporal query language (TSQL2)
– Object query language (OQL)
– Object oriented structured query language (O2SQL)
Spatial query language provides tools and structures
specifically for working with spatial data
SQL3 provides 2D geospatial types and functions
Spatial Query Language Operations
Three types of queries:
– Basic operations on all data types (e.g. IsEmpty,
Envelope, Boundary)
– Topological/set operators (e.g. Disjoint, Touch,
Contains)
Spatial analysis (e.g. Distance, Intersection, SymmDiff)
Spatial Data Entity Creation
Form an entity to hold county names, states, populations,
and geographies
CREATE TABLE County(
Name varchar(30),
State varchar(30),
Pop Integer,
Shape Polygon);
Form an entity to hold river names, sources, lengths, and
geographies
CREATE TABLE River(
Name varchar(30),
Source varchar(30),
Distance Integer,
Shape LineString);
Example Spatial Query
Find all the counties that border on Contra Costa county
SELECT [Link]
FROM County C1, County C2
WHERE Touch([Link], [Link]) = 1 AND
[Link] = ‘Contra Costa’;
Find all the counties through which the Merced river
runs
SELECT [Link], [Link]
FROM County C, River R
WHERE Intersect([Link], [Link]) = 1 AND
[Link] = ‘Merced’;
CREATE TABLE County(
Name varchar(30),
State varchar(30),
Pop Integer,
Shape Polygon);
CREATE TABLE River(
Name varchar(30),
Source varchar(30),
Distance Integer,
Shape LineString);