How To Use Index In Sql Query

- 07.22

SQL cheat sheet | zeroturnaround.com
photo src: zeroturnaround.com

A spatial database is a database that is optimized for storing and querying data that represents objects defined in a geometric space. Most spatial databases allow representing simple geometric objects such as points, lines and polygons. Some spatial databases handle more complex structures such as 3D objects, topological coverages, linear networks, and TINs. While typical databases have developed to manage various numeric and character types of data, such databases require additional functionality to process spatial data types efficiently, and developers have often added geometry or feature data types. The Open Geospatial Consortium developed the Simple Features specification (first released in 1997) and sets standards for adding spatial functionality to database systems. The SQL/MM Spatial ISO/EIC standard is a part the SQL/MM multimedia standard and extends the Simple Features standard with data types that support circular interpolations.


Index Tuning Decision Tree for SQL Server - by Kendra Little
photo src: littlekendra.com


Maps, Directions, and Place Reviews



Geodatabase

A geodatabase (also geographical database and geospatial database) is a database of geographic data, such as countries, administrative divisions, cities, and related information. Such databases can be useful for websites that wish to identify the locations of their visitors for customization purposes.


How To Use Index In Sql Query Video



Features of spatial databases

Database systems use indexes to quickly look up values and the way that most databases index data is not optimal for spatial queries. Instead, spatial databases use a spatial index to speed up database operations.

In addition to typical SQL queries such as SELECT statements, spatial databases can perform a wide variety of spatial operations. The following operations and many more are specified by the Open Geospatial Consortium standard:

  • Spatial Measurements: Computes line length, polygon area, the distance between geometries, etc.
  • Spatial Functions: Modify existing features to create new ones, for example by providing a buffer around them, intersecting features, etc.
  • Spatial Predicates: Allows true/false queries about spatial relationships between geometries. Examples include "do two polygons overlap" or 'is there a residence located within a mile of the area we are planning to build the landfill?' (see DE-9IM)
  • Geometry Constructors: Creates new geometries, usually by specifying the vertices (points or nodes) which define the shape.
  • Observer Functions: Queries which return specific information about a feature such as the location of the center of a circle

Some databases support only simplified or modified sets of these operations, especially in cases of NoSQL systems like MongoDB and CouchDB.


Solution to high CPU usage of Alibaba Cloud RDS SQL Server - index ...
photo src: www.alibabacloud.com


Spatial index

Spatial indices are used by spatial databases (databases which store information related to objects in space) to optimize spatial queries. Conventional index types do not efficiently handle spatial queries such as how far two points differ, or whether points fall within a spatial area of interest. Common spatial index methods include:

  • HHCode
  • Grid (spatial index)
  • Z-order (curve)
  • Quadtree
  • Octree
  • UB-tree
  • R-tree: Typically the preferred method for indexing spatial data. Objects (shapes, lines and points) are grouped using the minimum bounding rectangle (MBR). Objects are added to an MBR within the index that will lead to the smallest increase in its size.
  • R+ tree
  • R* tree
  • Hilbert R-tree
  • X-tree
  • kd-tree
  • m-tree - an m-tree index can be used for the efficient resolution of similarity queries on complex objects as compared using an arbitrary metric.
  • Point access method
  • Binary space partitioning (BSP-Tree): Subdividing space by hyperplanes.

Use SQL To Query Multiple Elasticsearch Indexes - Dremio
photo src: www.dremio.com


Spatial database systems

List

  • All OpenGIS specifications compliant products
  • Open-source spatial databases and APIs, some of which are OpenGIS-compliant
  • Caliper extends the Raima Data Manager with spatial datatypes, functions, and utilities.
  • Boeing's Spatial Query Server spatially enables Sybase ASE.
  • Smallworld VMDS, the native GE Smallworld GIS database
  • SpatiaLite extends Sqlite with spatial datatypes, functions, and utilities.
  • IBM DB2 Spatial Extender can spatially-enable any edition of DB2, including the free DB2 Express-C, with support for spatial types
  • ClusterPoint offers native indexed support for distances, range matching and polygon matching, as well as aggregation.
  • Oracle Spatial
  • Oracle Locator
  • Vertica Place, the geo-spatial extension for HP Vertica, adds OGC-compliant spatial features to the relational column-store database.
  • Microsoft SQL Server has support for spatial types since version 2008
  • PostgreSQL DBMS (database management system) uses the spatial extension PostGIS to implement the standardized datatype geometry and corresponding functions.
  • Teradata Geospatial includes 2D spatial functionality (OGC-compliant) in its data warehouse system.
  • MonetDB/GIS extension for MonetDB adds OGS Simple Features to the relational column-store database.
  • Linter SQL Server supports spatial types and spatial functions according to the OpenGIS specifications.
  • MySQL DBMS implements the datatype geometry, plus some spatial functions implemented according to the OpenGIS specifications. However, in MySQL version 5.5 and earlier, functions that test spatial relationships are limited to working with minimum bounding rectangles rather than the actual geometries. MySQL versions earlier than 5.0.16 only supported spatial data in MyISAM tables. As of MySQL 5.0.16, InnoDB, NDB, BDB, and ARCHIVE also support spatial features.
  • Neo4j - a graph database that can build 1D and 2D indexes as B-tree, Quadtree and Hilbert curve directly in the graph
  • AllegroGraph - a graph database which provides a novel mechanism for efficient storage and retrieval of two-dimensional geospatial coordinates for Resource Description Framework data. It includes an extension syntax for SPARQL queries.
  • MarkLogic, MongoDB, RavenDB, and RethinkDB support geospatial indexes in 2D.
  • Esri has a number of both single-user and multiuser geodatabases.
  • SpaceBase, a real-time spatial database.
  • CouchDB a document-based database system that can be spatially enabled by a plugin called Geocouch
  • CartoDB, a cloud-based geospatial database on top of PostgreSQL with PostGIS
  • AsterixDB, an open-source big data management system with native geospatial capabilities
  • Kinetica, a GPU-accelerated analytics database optimized for geospatial analytics on large datasets.
  • MapD, an open source GPU-accelerated database and visualization platform for real-time analytics on large datasets, with a focus on geospatial data.
  • SpatialDB by MineRP, the world's first open-standards (OGC) spatial database with spatial type extensions for the Mining Industry
  • H2 supports geometry types and spatial indices as of version 1.3.173 (2013-07-28). An extension called H2GIS available on Maven Central gives full OGC Simple Features support.
  • GeoMesa is a cloud-based spatio-temporal database built on top of Apache Accumulo and Apache Hadoop. GeoMesa supports full OGC Simple Features support and a GeoServer plugin.
  • Ingres 10S and 10.2 include native comprehensive spatial support. Ingres includes the Geospatial Data Abstraction Library cross-platform spatial data translator.
  • Tarantool supports geospatial queries with RTREE index.
  • SAP HANA supports geospatial with SPS08 [1].
  • Redis with the Geo API [2]

Table of free systems especially for spatial data processing

Source of the article : Wikipedia



EmoticonEmoticon

 

Start typing and press Enter to search