Spatial Data Management
Spatial Data Management
Spacial data management deals with the storage, Indexing, and querying of
data with spacial feature such as location and geometric extent.
Point Data ƒ :
Points in a multidimensional space ƒ
A point has a spatial extent characterized completely by its
location .
E.g., Raster data such as satellite imagery, where each pixel stores a
measured value ƒ E.g., Feature vectors extracted from text .™
Region Data :
ƒ Objects have spatial extent with location and boundary. ƒ
Region data consists of a collection of regions.
DB typically uses geometric approximations constructed using line
segments, polygons, etc., called vector data.
Computer-Aided Design/Manufacturing:
ƒ Store spatial objects such as surface of airplane fuselage.
ƒ Range queries and spatial join queries are common.
Multimedia Databases :
ƒ Images, video, text, etc. stored and retrieved by content ƒ First converted
to feature vector form; high dimensionality ƒ
Nearest-neighbor queries are the most common.
Consider entries: <11, 80>, <12, 10> <12, 20>, <13, 75>
11 12 13
70 60 50 40 30 20 10 80
B+ tree order
Multidimensional Indexes
Consider entries: <11, 80>, <12, 10> <12, 20>, <13, 75>
Spatial clusters
70 60 50 40 30 20 10 80
B+ tree order
11 12 13
ƒ Find all hotels within a radius of 5 miles from the conference venue. ƒ
Find the city with population 500,000 or more that is nearest to
Kalamazoo,MI. ƒ
Find all cities that lie on the Nile in Egypt. ƒ
Find all parts that touch the fuselage (in a plane design). ™
GRID FILE
A grid file or bucket grid is a point access method which splits a space into a
non-periodic grid where one or more cells of the grid refer to a small set of
points.
Grid files (a symmetric data structure) provide an efficient method of storing
these indexes on disk to perform complex data lookups.
A grid file is usually used in cases where a single value can be referenced by
multiple keys.
A grid file began being used because "traditional file structures that provide
multikey access to records, for example, inverted files, are extensions of file
structures originally designed for single-key access. They manifest various
deficiencies in particular for multikey access to highly dynamic files." [1]
In a traditional single dimensional data structure (e.g. hash), a search on a
single criterion is usually very simple but searching for a second criterion
can be much more complex.
Grid files represent a special kind of hashing, where the traditional hash is
replaced by a grid directory.
Advantages
Since a single entry in the grid file contains pointers to all records indexed by
the specified keys:
Disadvantages
Imposes space overhead
Performance overhead on insertion and deletion
Adapting Grid Files to Handle Regions
There are two basic approaches to handling region data in a Grid file, neither
of which is satisfactory.
First, We can represent a region by a point in a higher diamentional space
The second approach is to store a record representing the region object in
each
grid partition that overlaps the region object.
R TREES: POINT AND REGION DATA
R-Tree Example
Operations
Searching: look at all nodes that intersect, then recurse into those nodes.
Many paths may lead nowhere
Insertion: Locate place to insert node through searching and insert.
If a node is full, then a split needs to be done
Deletion: node becomes underfull. Reinsert other nodes to maintain balance.
Queries
The generalized search tree (GiST) abstracts the essential features of tree
index structures and provides 'template' algorithms for insertion, deletion, and
searching.
Searches for region objects and range queries are handled sirnilarly by
COluputing
a bounding box for the desired region and proceeding as in the search for
an object.
R‐Tree Search Algorithm
• Similar to B‐Tree.
• Adds to the appropriate leaf.
• Appropriate leaf can be find by Minimum Bounding Rectangle
idea.(Appropriate leaf)
• If there is a node contains MBR,search subtree until find the
appropriate leaf.
• If leaf node overflows, propogate the tree like B‐Tree.(split vs.)