Вы находитесь на странице: 1из 2

Assignment 01

Comparison of Postgres, MySQL and SQLite in their use of Spatial Data


Spatial data also known as geospatial data or geographic data is used to identify the
location of geographic features on the Earth surface. A spatial database is designed to provide
abstraction to represent these objects in the form of points, line and regions geometry types as
well as to provide additionally the number of operators and functionalities that can be used to
establish topological relationships between these objects.
There are a lot of proprietary as well as open source data management systems
available to handle spatial data out of which MySQL, SQLite and Postgres are quite effective
and commendable in their working. Following is the comparison of these three data
management tools.

MySQL:
MySQL is one of the most widespread large scale database servers that is feature rich
and yet open-source product. It does not try to implement the full SQL standards or
frameworks and still offers a number of functionalities to the users. Working as a stand-alone
DB server, applications communicate with MySQL daemon process to access the database
itself, unlike SQLite
MySQL implements a portion of the OpenGIS Simple feature access specifications. An
assembly of Geometry type is supported, but only on a 2D plane. The Geography type systems
(i.e. latitude, longitude) are not applied in MySQL. Also within the Geometry implementation,
MySQL has only supported functionality grounded on Minimum Bounding Rectangle (MBR)
processes. Despite of that the two objects that do not actually intersect, might be returned as
intersecting if their bounding rectangles would intersect.
Another drawback of MySQL for spatial data support is and functionality is the lack of
spatial indexing an R-tree support for InnoDB tables. Also MySQL ignores the SRID if specified
and performs all calculations using Euclidean geometry. But despite of all these drawbacks
MySQLs user friendliness clearly stands out in favor of MySQL.

SQLite:
SQLite is a remarkable data management tool that gets embedded inside the
applications that are utilizing it. It deals as self-reliant, file based database which offers an
incredible set of tools to deal with all sorts of data with considerably fewer limitations and
simplicity as compared to hosted, process based relational databases.
SYED WALEED ALI

Spatialite is a variant of the SQLite database that provides spatial features and
functionalities. It incorporates the GEOS, PROJ.4 libraries that are also used in PostGIS and
hence the subsequent feature set is parallel. In particular, Spatialite supports diverse geometric
reference systems (the Spatial Reference Identifier (SRID) values) and correctly handles
projections into each reference system. Only Geometry types (2D x, y operations) are
supported, the Geography type operations are not.
The R-tree index only provisions bounding rectangles. What's more, while the R-tree is
retained automatically, it is not truly encompassed in query plans by the SQLite optimizer. As an
alternative, the user has to explicitly query a table that is the R-tree index, and include this into
the actual query as a sub-query or join. One major drawback of SQLite is the lack of support for
Geography projections (i.e. latitude, longitude).

PostgreSQL:
Postgres is the advanced, object oriented relational database management system with
the utmost goal of being standards-compliant and extensible due to its programmable nature.
Postgres lacks the popularity factor as matched to MySQL but there are a number of
remarkable third party tools and libraries that are produced to make operational with Postgres
making it highly interoperable.
For instance PostGIS supports both Geometry (x, y) and Geography (i.e. latitude,
longitude) types and functions. The functions take incorporates the specified Spatial
Referencing System Identifier (SRID) and calculate distances using the correct projections.
Compared with MySQL, Postgres is no doubt more advanced and incorporates more
features yet quiet complex. But the provision for using the correct projections with supplying
the SRID and Geography types, makes it completely distinctive than any other open source
alternative.

References:

Comparing Open Source GIS Implementations


Databases and Data access APIs
A Case Study on Geospatial Data Management
https://www.digitalocean.com
http://www.postgresonline.com/

SYED WALEED ALI

Вам также может понравиться