



Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!




Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 1
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 2
Points in a multidimensional space E.g., Raster data such as satellite imagery, where each pixel stores a measured value E.g., Feature vectors extracted from text
Objects have spatial extent with location and boundary DB typically uses geometric approximations constructed using line segments, polygons, etc., called vector data.
Spatial Range Queries Find all cities within 50 miles of Madison Query has associated region (location, boundary) Answer includes ovelapping or contained data regions Nearest-Neighbor Queries Find the 10 cities nearest to Madison Results must be ordered by proximity Spatial Join Queries Find all cities near a lake Expensive, join condition involves regions and proximity
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 4
Geographic Information Systems (GIS) E.g., ESRI’s ArcInfo; OpenGIS Consortium Geospatial information All classes of spatial queries and data are common 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
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 5
Consider entries: <11, 80>, <12, 10> <12, 20>, <13, 75>
B+ tree order
Consider entries: <11, 80>, <12, 10> <12, 20>, <13, 75>
Spatial clusters
B+ tree order 11 12 13
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 10
This is Alternative (2), with key value being a box. Box is the tightest bounding box for a data object.
Box covers all boxes in child node (in fact, subtree).
Can choose a parameter m that is <= 50%, and ensure that every node is at least m % full.
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 11
R
R
R
R
R
R
R
R
R R
R
R
R
R
R
R R
R
R
Leaf entry
Index entry
Spatial object approximated by bounding box R
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 13
Note: May have to search several subtrees at each node! (In contrast, a B-tree equality search goes to just one leaf.)
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 14
Will reduce overlap with nodes in tree, and reduce the number of nodes fetched by avoiding some branches altogether. Cost of overlap test is higher than bounding box intersection, but it is a main-memory cost, and can actually be done quite efficiently. Generally a win.
Go to child whose box needs least enlargement to cover B; resolve ties by going to smallest area child.
Adjust entry for L in its parent so that the box now covers (only) L1. Add an entry (in the parent node of L) for L2. (This could cause the parent node to recursively split.)
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 19
Typically, high-dimensional datasets are collections of points, not regions. E.g., Feature vectors in multimedia applications. Very sparse Nearest neighbor queries are common. R-tree becomes worse than sequential scan for most datasets with more than a dozen dimensions. As dimensionality increases contrast (ratio of distances between nearest and farthest points) usually decreases; “nearest neighbor” is not meaningful. In any given data set, advisable to empirically test contrast.
Database management Systems, 3ed, R. Ramakrishnan and J. Gehrke 20
Point and region data Overlap/containment and nearest-neighbor queries
R-tree approach is widely used in GIS systems Other approaches include Grid Files, Quad trees, and techniques based on “space-filling” curves. For high-dimensional datasets, unless data has good “contrast”, nearest-neighbor may not be well- separated