Docsity

Spatial Database System - Lecture Notes | CSCI 585, Study notes of Deductive Database Systems

Partial preview of the text

Download Spatial Database System - Lecture Notes | CSCI 585 and more Study notes Deductive Database Systems in PDF only on Docsity!

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Spatial Database Systems

Excerpt from

VLDB Journal Vol. 3, No. 4, October 1994 by Ralf Hartmut Guting

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

 Outline

Introduction

Modeling

Querying

Data structures and algorithms

System architecture

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

What is NOT a Spatial Database!



of relatively simple geometric objectsCommon challenge: dealing with large collections



Different from

image

and

pictorial

database systems:

pictures of a spaceContaining sets of objects in space rather than images or

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

What is a Spatial Database: Definition



A spatial database system:

Is a database system

  • A DBMS with additional capabilities for handling spatial data

languageOffers spatial data types (SDTs) in its data model and query

  • Relationships among them: (• Structures in space: e.g., POINT, LINE, REGION

l intersects r

)

Supports SDT in its implementation

  • Providing at least spatial indexing (retrieving objects in particular

area without scanning the whole space)

  • Efficient algorithm for spatial joins (not simply filtering the

Cartesian product)

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Modeling Single Objects



Fundamental abstractions for modeling single objects:



e.g., the capital of a statePoint: object represented only by its location in space,



moving through or connections in space, e.g., road, riverLine (actually a curve or polyline): representation of a



lake, cityRegion: representation of an extent in 2D space, e.g.,

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani



Instances of spatially related collections of objects:

Modeling related Collections of Objects

Partition: set of

region

objects that are

adjacent and disjoint, e.g., thematic maps

highways, power lines, rivers, etc.(vertices) and line (edges) objects, e.g.graph in plane consisting of a set of pointSpatially Embedded Networks: embedded

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

ROSE Algebra (cont’d)



Operators returning numbers:

dist:

geo

×

geo

real

perimeter, area:

regions

real



Operators on set of objects (i.e., aggregate operators):

sum:

set(obj)

×

(obj

geo)

geo

  • A spatial aggregate function, geometric union of all attribute

countryvalues, e.g., union of set of provinces determine the area of the

closest:

set(obj)

×

(obj

geo1)

×

geo

set(obj)

  • Determines within a set of objects those whose spatial attribute

value has minimal distance from geometric query object

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Spatial Relationships to Capture with a Model

Spatial relationships:

Topological relationships: e.g.,

adjacent, inside,

disjoint

; these are invariant under topological

rotationtransformations such as translation, scaling, and

Direction relationships: e.g.,

above, below, or north_of,

southwest_of

Metric relationships: e.g.,

distance

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Querying

Two main issues:

language.relationships) to the facilities of a DBMS query(including predicates to express spatialConnecting the operations of a spatial algebra

of the SDT values used in queries.(i.e., results of queries) as well as graphical inputProviding graphical presentation of spatial data

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Spatial Selection

 Fundamental spatial algebra operations:

Spatial selection

: returning those objects satisfying a

spatial predicate with the query object.

Bavaria.area SELECT sname FROM cities c WHERE c.center inside “All cities in Bavaria”

SELECT * FROM rivers r WHERE r.route intersects Window “All rivers intersecting a query window”

“All big cities no more than 100 kms from Hagen”

SELECT cname FROM cities c WHERE dist(c.center, Hagen.center) < 100 and c.pop > 500k

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Graphical Presentation

 Graphical I/O issue:

“Bavaria”INPUT Presentation: e.g., how to define “Window” or



Bavaria.area)” or “r.route”OUTPUT Presentation: how to show “intersection(route,

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Requirements for Graphical Presentation



Spatial data types



Graphical display of query results



Graphical combination (overlay) of several query results

(start a new query, add/remove layers, change order of layers)



boundary of states)Display of context (e.g., show background such as a raster image or



overlay)Facility to check the content of a display (which query contributed to which



zooming, …Extended dialog: use pointing device to select objects within a subarea,



symbols to different objects classes or even objects within a classVarying graphical representations: different colors, patterns, intensity,



Legend: clarify the assignment of graphical representations to object classes



Label placement: selecting object attributes (e.g., population) as labels



also what kind of symbol be used and whether an object be shown at allScale selection: determines not only size of the graphical representations but

[Egenhofer, TKDE 94]

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Spatial Indexing



operations such as spatial joins, …)To expedite spatial selection (as well as other



need to be considered to answer a query.that only parts of the space and a subset of the objectsIt organizes space and the objects in it in some way so



Two main approaches:

Dedicated spatial data structures (e.g., R-tree)

techniques (e.g., B-tree)Spatial objects mapped to a 1-D space to utilize standard indexing

USC - CSCI585 - Spring 2008 - Farnoush Banaei-Kashani

Approximation of Spatial Objects

Approaches:

Continuous (e.g., bounding box)

Grid

1. Filter and refine strategy for query processing:

of the objects satisfying a predicate;Filter: returns a set of candidate object which is a superset

Refine: for each candidate, the exact geometry is checked