Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Aptitude
  • Engineering Mathematics
  • Discrete Mathematics
  • Operating System
  • DBMS
  • Computer Networks
  • Digital Logic and Design
  • C Programming
  • Data Structures
  • Algorithms
  • Theory of Computation
  • Compiler Design
  • Computer Org and Architecture
Open In App
Next Article:
Types of Queries in IR Systems
Next article icon

Types of Spatial Queries in DBMS

Last Updated : 10 Apr, 2020
Comments
Improve
Suggest changes
Like Article
Like
Report

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.

  1. 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.

  2. 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.
  3. 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.



Next Article
Types of Queries in IR Systems

S

sudiptadandapat
Improve
Article Tags :
  • DBMS

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 Relationship in Database
    A relationship in a DBMS exists when a variable has a connection with the properties stored in different tables. Such relationships help the organization of entities intertwined with each other, ultimately enabling efficient data processing. They're exhibited usually via keys in a table, which is ei
    4 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
  • Use of DBMS in System Software
    Here we are going to discuss about how a user interacts with a DBMS, and how the DBMS is related to system software. Using a general-purpose programming language, user can write a source program in the normal way. However, instead of writing I/O statements of the form provided by the programming lan
    5 min read
  • Degree of Relations in DBMS
    We are living in a world where every entity has relationships with one other whether a living or non-living being. For example, you are a single entity but you share different relations with your family and friends. Even within a family, you are the son of your father at the same time you are also a
    4 min read
  • What is Relationship Type in DBMS?
    In DBMS (database management system) relationships are important concept that tells us how data is structured, stored and accessed, Just like in real life where relationships connect people (like relationship between parent and child) in same way DBMS link different data sets in a meaningful way. In
    6 min read
  • Production databases in SQL queries
    SQL is a Structured Query Language which is a computer language for storing, manipulating, and retrieving data stored in a relational database. SQL is the most powerful data handling tool. Actionable advice to help you get the most versatile language and create beautiful, effective queries. SQL is e
    4 min read
  • Query Tree in Relational Algebra
    A Query Tree is a data structure used for the internal representation of a query in RDBMS. It is also known as the Query Evaluation/Execution Tree. The leaf nodes of the query tree represent the relations, and the internal nodes are the relational algebra operators like SELECT (σ), JOIN (⋈), etc. Th
    4 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences