Understanding Spatial Database From Scratch In Open Source Software (QGIS)
Location enabled applications are very common nowadays and many of them use spatial database functions from the back-end. This article describes the fundamentals of spatial databases in general as used within the world's leading open source geospatial software.
In our quest to understand what "spatial database" is, let’s first understand the meaning of the two words "spatial" and "database" that formed the phrase.
WHAT IS SPATIAL?
The word spatial describes how objects fit together in a certain location (space), either among the planets or down here on earth. Spatial is relating to, occupying, or having the character of space.
WHAT IS DATABASE?
A database is an organized collection of data that can easily be accessed, managed, and updated. Database is also viewed as a collection of related information that permits the entry, storage, input, output and organization of data. A database consists of an organized collection of data for one or more uses, typically in digital form.
A database management system (DBMS) serves as an interface between users and their database. A database management system (DBMS) consists of software that operates databases, providing storage, access, security, backup and other facilities (
Wikipedia, 2020).
Data are organized into fields (columns/attributes) and records (rows/entries) in most traditional or regular databases. Another name for traditional or regular database is non-spatial database or normal database.
COMMONLY USED DATABASES
There are several examples of database servers available, but the top common once include: SQLite, Oracle, MySQL, PostgreSQL, IBM DB2, MS Access and MsSQL server.
WHAT MAKES A DATABASE "SPATIAL DATABASE"?
The ability of a database to store and access data that represent objects defined in a geometric space makes it a Spatial Database. Spatial databases use specialized software to extend a traditional database to store and query data defined in two-dimensional or three-dimensional space. The spatial extensions allow you to query geometries using Structured Query Language (SQL) in a similar way to traditional database queries. Spatial queries and attribute queries can also be combined to select results based on both location and attributes.
A Spatial database is also referred to as 'geodatabase' or 'geographical database' or 'geospatial database'.
Most of the commonly used (well-known) databases that have an extended support for spatial objects are listed below:-
S/N
|
Database
|
Spatial Extension
|
License
|
1.
|
Oracle
|
Oracle Spatial/Locator
|
Proprietary
|
2.
|
PostgreSQL
|
PostGIS
|
Open
Source
|
3.
|
MsSQL
Server
|
MsSQL
Spatial
|
Proprietary
|
4.
|
IBM
DB2
|
DB2
Spatial
|
Proprietary
|
5.
|
MySQL
|
MySQL
Spatial
|
Open
Source
|
6.
|
MS
Access
|
Not
supported
|
Proprietary
|
7.
|
SQLite
|
SpatiaLite
|
Open
Source
|
Note: If your dataset is extremely large (big data), you may like to consider a database framework called:
Hadoop - SpatialHadoop.
Above are all SQL /relational based databases that best work with data that have relationship.
Another category of databases worth mentioning is the NoSQL (Not only SQL) database. NoSQL databases are designed for volume and rapid indexing of unstructured or semi-structured data. They are good at dealing with lots and lots of reading/writing tasks coming in at once in real-time (a common feature found in web-based GIS), something that tends to slow down SQL/relational databases.
Web-based GIS is probably the area that is currently leading in the use of NoSQL databases within GIS industry, as types of real-time data are more typically found in these platforms when compared to the desktop platforms.
Some popular examples of NoSQL database are:-
a)
Cassandra
b)
Mongodb
c)
CouchDB
d)
Redis
e)
Riak
f)
RethinkDB
g)
Couchbase (ex-Membase)
h)
Hypertable
i)
ElasticSearch
j)
Accumulo
k)
VoltDB
l)
Kyoto Tycoon
m)
Scalaris
n)
OrientDB
o)
Aerospike
p)
Neo4j
q)
HBase