![]() |
VOOZH | about |
Today, many applications deal with information that is related to locations, shapes, maps, and geographical features. A normal database cannot efficiently handle such location-based information. That’s where spatial data and spatial databases come into the picture.
Spatial data is data that represents objects in physical space — anything that has a shape, size, or position on Earth.
Examples:
Normal indexes (like B-Trees or hashing) cannot efficiently answer questions such as:
“Find all buildings that lie inside this area”
“Show all roads that intersect this route”
“Which houses are within 5 km of this point?”
To handle such queries, databases need special spatial index structures like R-trees.
Raster = grid of pixels (like a photo or image).
Each pixel has an associated value (color, elevation, temperature, etc.)
Examples:
Think of raster as an image divided into tiny squares.
Vector = geometric shapes that represent real-world objects.
Examples:
Vector data is more precise and structured than raster data.
CAD is used to design:
Problems with old CAD systems:
OODBMS represent every component as an object.
Example:
This makes the design more organized, efficient, and scalable.
GIS stores and manages geographical data, such as:
GIS data differs from CAD data:
Since SQL Server 2008, it supports spatial data types and spatial indexes.
You can store:
Find all locations within 10 km of this point.
CouchDB is a document-based NoSQL database.
GeoCouch plugin adds:
Neo4j is a graph database.
It handles spatial data mainly for:
Example:
Find the shortest route between two locations.