Types of Spatial Queries in DBMS
Last Updated :
10 Apr, 2020
Improve
Any type of spatial data that is data related to location and which represents objects defined in a geometric space, is stored and maintained by Spatial Databases. These are used to handle these Spatial Databases. Spatial database mainly contain representation of simple geometric objects such as 3D objects, topological coverage, linear networks and TINs(Triangulated irregular networks).
There are mainly three types of spatial queries as given below.
- Nearness queries: It request objects that present near a specified location. A query to find all Hotels that lie within a given distance of a given point is an example of a nearness query. The nearest-neighbor query requests the object that is nearest to a specified point. For example, we may want to find the nearest Railway station. Note that this query does not have to specify a limit on the distance, and hence we can ask it even if we have no idea how far the nearest Railway station lies.
- Region queries: It deal with spatial regions. For example, a query can ask for objects that is present partially or completely within a fixed region. A query to find all medicine shops within the geographic boundaries of a given town or we can find all the available school in a particular city.
- Union/Intersection: In this type of queries, we may also request intersections and unions of regions. For example, given region information, such as annual rainfall and population density, a query may request all regions with a low annual rainfall as well as a high population density.