Download Spatial Database Systems

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft Access wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Database wikipedia , lookup

Functional Database Model wikipedia , lookup

Clusterpoint wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
SPATIAL DATABASE
SYSTEMS
WHAT IS A SPATIAL DATABASE?
•
•
•
A spatial database is a database that is enhanced
to store and access spatial data or data that
defines a geometric space.
Data on spatial databases are stored as
coordinates, points, lines, polygons and topology.
Spatial RDBMS allows to use SQL data types, such
as int and varchar, as well as spatial data types,
such as Point, Linestring and Polygon for geometric
calculations like distance or relationships between
shapes.
• RDBMS uses the B-Tree series or Hash Function to
process indexes, only one-dimensional data can be
processed. Since spatial data types are two or three
dimensional:
• R-Tree series or Quad Trees can be used in Spatial RDBMS
to process such data;
• Or it is necessary to transform two or three dimensional
data to one dimensional data, then B-Tree can be used.
SPATIAL DATABASE APPLICATIONS
• GIS applications (maps):
• Urban planning, route optimization, fire or pollution
monitoring, utility networks, etc
• Other applications:
• VLSI design, CAD/CAM, model of human brain, etc
• Traditional applications:
• Multidimensional records
• ESRI products
• OSGeo projects
•
SPATIAL DATA TYPES
point
line
• Point : 2 real numbers
• Line : sequence of points
• Region : area included inside n-points
region
SPATIAL REPRESENTATION
HOW RASTER DATASETS
REPRESENT REAL-WORLD FEATURES
Different types of data are stored in different file formats.
SPATIAL RELATIONSHIPS
• Topological relationships:
• adjacent, inside, disjoint, etc
• Direction relationships:
• Above, below, north_of, etc
• Metric relationships: “distance < 100”
MODELS, LANGUAGES
• Extent relational model,
or use Object-relational model: define new ADTs
• Query languages:
• Extend SQL : GEOQL, PSQL
• New graphical languages: GEO-SAL
EXAMPLES
• A database:
• Relation states(sname: string, area: region, spop: int)
• Relation cities(cname: string, center: point; ext: region)
• Relation rivers(rname: string, route:line)
• SELECT * FROM rivers WHERE route intersects R
• SELECT cname, sname FROM cities, states WHERE
center inside area
• SELECT rname, length(intersection(route,
California)) FROM rivers WHERE route intersects
California
SPATIAL QUERIES
• Selection queries:
“Find all objects inside query q”, inside-> intersects, north
• Nearest Neighbor-queries:
“Find the closets object to a query point q”, k-closest
objects
• Spatial join queries: Two spatial relations S1 and S2,
find all pairs: {x in S1, y in S2, and x rel y= true}, rel=
intersect, inside, etc
EXAMPLE OF SPATIAL SQL
NEAREST NEIGHBOR SEARCH
ACCESS METHODS
• Point Access Methods (PAMs):
• Index methods for 2 or 3-dimensional points (k-d trees, Zordering, grid-file)
• Spatial Access Methods (SAMs):
• Index methods for 2 or 3-dimensional regions and points
(R-trees)
INDEXING USING SAMS
• Approximate each region with a simple shape: usually
Minimum Bounding Rectangle (MBR) = [(x1, x2), (y1, y2)]
y2
y1
x1
x2
MBR
(MINIMUM BOUND RECTANGLE)
INDEXING USING SAMS
(CONT.)
Two steps:
• Filtering step: Find all the MBRs (using the SAM) that
satisfy the query
• Refinement step : For each qualified MBR, check the
original object against the query
INDEXING USING PAMS
• Map the MBR in 2-d into a point in 4-d:
[(x1, x2), (y1, y2)]  (x1, x2, y1, y2)
• Transform the query into the new space
• Use a 4-d PAM to answer queries.
Q
a
a
b
Q
b