24
SPOT DATABASES: EFFICIENT CONSISTENCY CHECKING AND OPTIMISTIC SELECTION IN PROBABILISTIC SPATIAL DATABASES Presented By : Pratik S. Udapure

Spot db consistency checking and optimization in spatial database

Embed Size (px)

DESCRIPTION

SPOT databases: Spatial PrObablistic Temporal Databases

Citation preview

Page 1: Spot db  consistency checking and optimization in spatial database

SPOT DATABASES: EFFICIENT CONSISTENCY CHECKING AND OPTIMISTIC SELECTION INPROBABILISTIC SPATIAL DATABASES

Presented By : Pratik S. Udapure

Page 2: Spot db  consistency checking and optimization in spatial database

Agenda

Introduction Optimization Spatial Indexes Spatial Query SQL examples Features of Spatial Databases Advantages of Spatial Databases Disadvantages of Spatial Databases Conclusion

Page 3: Spot db  consistency checking and optimization in spatial database

Introduction

Spatial database: is a database that is optimized to store and query data that represents objects defined in a geometric space

It offers additional functions that allow processing spatial data types. Geometry. Geography.

Page 4: Spot db  consistency checking and optimization in spatial database

Introduction Cont.

Spatial Objects: Consists of lines, surfaces, volumes and higher dimension objects that are used in applications of computer-aided design, cartography, geographic information systems.

Spatial Data: The values of the objects spatial attributes (length, configuration, perimeter, area, volume, etc.)

Page 5: Spot db  consistency checking and optimization in spatial database

Spatial DB Image

Page 6: Spot db  consistency checking and optimization in spatial database

Optimization:

Optimizing spatial databases means optimizing the queries, which requires less time spent by running the queries before receiving an answer.

Page 7: Spot db  consistency checking and optimization in spatial database

Spatial Indexes

Indexing Spatial Data: a mechanism to decrease the number of searches (optimize spatial queries).

A Spatial Index is used to locate objects in the same area of data or from different locations

Spatial indexes include: Grid index Z-order Octree Quadtree UB-tree R-tree kd-tree M-tree

Page 8: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: Grid Index

In the context of a Spatial Index, a grid (a.k.a. "mesh", also "global grid" if it covers the entire surface of the globe) is a regular division of a 2-D surface that divides it into a series of contiguous cells, which can then be assigned unique identifiers and used for spatial indexing purposes.

Page 9: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: Z-Order

In mathematical analysis and computer science, Z-order, Morton order, or Morton code is a function which maps multidimensional data to one dimension while preserving locality of the data points.

Page 10: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: Octree

An octree is a tree data structure in which each internal node has exactly eight childern. Octrees are most often used to partition a three dimensional space by recursively subdividing it into eight octants

Page 11: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: Quad Tree

A quadtree is a tree data structure in which each internal node has exactly four children. Quadtrees are most often used to partition a two-dimensional space by recursively subdividing it into four quadrants or regions.

Page 12: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: UB Tree

The UB-tree as proposed by Rudolf Bayer and Volker Markl is a balanced tree for storing and efficiently retrieving multidimensional data. It is basically a B+tree (information only in the leaves) with records stored according to z-order, also called Morton order. Z-order is simply calculated by bitwise interlacing the keys.

Page 13: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: R Tree

R-trees are tree data structure used for spatial access methods,i.e., for indexing multi-dimensional information such as geographical coordinates, rectangles or polygons.

Page 14: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: KD Tree

The k-d tree is a binary tree in which every node is a k-dimensional point. Every non-leaf node can be thought of as implicitly generating a splitting hyperlane that divides the space into two parts, known as half spaces.

Page 15: Spot db  consistency checking and optimization in spatial database

Spatial Indexes: M Tree

M-trees are tree data structure that are similar to R-trees and B-trees. As in any Tree-based data structure, the M-Tree is composed of Nodes and Leaves. In each node there is a data object that identifies it uniquely and a pointer to a sub-tree where its children reside. Every leaf has several data objects

Page 16: Spot db  consistency checking and optimization in spatial database

Spatial Query

A spatial query is a special type of database query supported by geo databases and spatial databases

Some of the most important are that they allow for the use of geometry data types such as points, lines and polygons and that these queries consider the spatial relationship between these geometries.

Page 17: Spot db  consistency checking and optimization in spatial database

SQL example

Create “pubs” table

create table pubs (name varchar,

beer-price float4);

addgeometrycolumn(‘beer-db’,'pubs','location’

,2167,'POINT',3);

Page 18: Spot db  consistency checking and optimization in spatial database

Insert data

insert into pubs values ('Garricks Head',4.50,GeometryFromText('POINT (1196131 383324)’,2167));

Page 19: Spot db  consistency checking and optimization in spatial database

Perform Query

select name, beer-price, distance(location, GeometryFromText('POINT(1195722 383854)',2167))

from pubs order by beer-price;

name | beer-price | distance ---------------+------------+------------------ Fireside | 4.25 | 1484.10275160491 The Forge | 4.33 | 1533.06561109862 Rumours | 4.46 | 2042.00094093097 Garricks Head | 4.5 | 669.389105609889 Slap Happy | 4.5 | 1882.31910168298 Old Bailys | 4.55 | 1147.20900404641 Black Sheep | 4.66 | 536.859935972633 Big Bad Daves | 4.75 | 907.446543878884

Page 20: Spot db  consistency checking and optimization in spatial database

Features of spatial databases

Spatial Measurements: Computes line length, polygon area, the distance between geometries, etc.

Spatial Functions: Modify existing features to create new ones, for example by providing a buffer around them, intersecting features, etc.

Spatial Predicates: Allows true/false queries about spatial relationships between geometries. Examples include "do two polygons overlap" or 'is there a residence located within a mile of the area we are planning to build the landfill?'

Geometry Constructors: Creates new geometries, usually by specifying the vertices (points or nodes) which define the shape.

Observer Functions: Queries which return specific information about a feature such as the location of the center of a circle

Page 21: Spot db  consistency checking and optimization in spatial database

Advantages of Spatial Databases

Able to treat your spatial data like anything else in the DB

transactions backups integrity checks less data redundancy fundamental organization and operations handled by the DB multi-user support security/access control locking

Page 22: Spot db  consistency checking and optimization in spatial database

Advantages cont.

Spatial querying using SQL use simple SQL expressions to determine spatial relationships distance adjacency containment

use simple SQL expressions to perform spatial operations area length intersection union buffer

Page 23: Spot db  consistency checking and optimization in spatial database

Disadvantages of Spatial Databases

Cost to implement can be high Some inflexibility Incompatibilities with some GIS software Slower than local, specialized data

structures User/managerial inexperience and caution

Page 24: Spot db  consistency checking and optimization in spatial database

Conclusion

Spatial Databases are widely used nowadays.

Optimizing Spatial Databases is of a significant importance.

Spatial databases can be optimized using spatial indexes like R-tree or Quadtree and other indexing structures.

Big career opportunities in Spatial DB sector in developing GIS software