Types of Spatial Queries in DBMS
Last Updated :
10 Apr, 2020
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.
In general, there is a combination of
spatial and Non spatial requirements in the queries on spatial data . For example, we may want to find the nearest restaurant that has vegetarian selections and that charges less than $10 for a meal.
Since spatial data are inherently graphical, we usually query them by using a
graphical query language. Results of such queries are also displayed graphically, rather than in tables. The user can invoke various operations on the interface, such as choosing an area to be viewed (e.g., by pointing and clicking on suburbs west of Manhattan), zooming in and out, choosing what to display on the basis of selection conditions (e.g., hotels with more than three stars), overlay of multiple maps (e.g., hotels with more than three stars overlaid on a map representing areas with low crime rates), and so on. The graphical interface constitutes the front end.
Extensions of SQL have been proposed to permit relational databases to store and retrieve spatial information efficiently, and also to allow queries to mix spatial and non spatial conditions. Extensions include allowing abstract data types, such as lines, polygons, and bit maps, and allowing spatial conditions, such as contains or overlaps.
Similar Reads
Types of Queries in IR Systems During the process of indexing, many keywords are associated with document set which contains words, phrases, date created, author names, and type of document. They are used by an IR system to build an inverted index which is then consulted during the search. The queries formulated by users are comp
3 min read
Spatial Data Types and Models Spatial data is the data collected through with physical real life locations like towns, cities, islands etc. Spatial data are basically of three different types and are wisely used in commercial sectors : Map data : Map data includes different types of spatial features of objects in map, e.g - an o
2 min read
Types of OLAP Systems in DBMS OLAP is considered (Online Analytical Processing) which is a type of software that helps in analyzing information from multiple databases at a particular time. OLAP is simply a multidimensional data model and also applies querying to it. Types of OLAP ServersRelational OLAPMulti-Dimensional OLAPHybr
6 min read
Relational Query Language in DBMS SQL has its own querying methods to interact with the database. But how do these queries work in the database? These queries work similarly to Relational Algebra that we study in mathematics. In the database, we have tables participating in relational Algebra. Relational Database systems are expecte
4 min read
What is a Query in DBMS? In the field of Database Management Systems (DBMS), a query serves as a fundamental tool for retrieving, manipulating, and managing data stored within a database. Queries act as the bridge between users and databases, enabling them to communicate with the system to extract specific information or pe
5 min read