What are we talking about when we think of a GIS Database? Below are a list of topics we will discuss in this lecture:
Differences between data structures and Database Management Systems (often both are called some sort of database – i.e. GeoDatabase)
Balance between users and/or software managing data
Benefits and reasons for using spatial data structures and or Database Management Systems
What is a Spatially Enabled Database, a GeoDabase and Database Management System
Fist of all – what do you think of when you think of a database? You will hear terms such as “We use Oracle for our database”. Most people conceptualize this sentence to mean, there is a bunch of data stored and accessed through the software that Oracle has created. In fact that is what is most likely meant as data is being stored and accessed using Oracle Database (https://www.oracle.com/database/index.html). As Oracle and other Relational Database Management Systems (RDBMS) are intimidating and not for average GIS users, it is not common to try using such software. It is usually governments are large corporate GIS data users that will make use of propriatary enterprise systems involving RDBMS such as Oracle.
This does not have to be the case, as there are many options for using databases as part of your GIS work – such as Open Source enterprise solutions (it does not take Scott too long to bring Open Source into the mix). As we found out in the lab, there are different levels of what are often labelled as Databases for GIS information, and they are not as intimidating and difficult to make use of.
Although we found it was easy to use a Spatial Database, it may seeem that they are mysterious and not beneficial for the average GIS user. In fact this is not the case and if we use Wikipedia to describe what a Spatial Database (with includes a definition of a database) we can see that users can make sense and use of these databases easily.
With this in mind, we can think of Spatial Enabled Databases as something that fits somewhere in the following stages:
Stages of looking at Spatial Database
- Data Structure: How do we produce our data objects (i.e Simple Features Specification or Edge Face and Node)
- Data Model: How you organize the data to help the work you are doing (i.e. Folders, file names, file types)
- Loading and managing of data into the data structure: (i.e ArcGIS loading into a file based geodata base or coverage). Software driven
- Loading data into a relational database (i.e. using a RDBMS to hold your data
Data Structures define how data is encoded at a low level and can be used to be rendered in software – such as the guts of a shapefile. As mentioned in the lab, we generally use Simple Features to describe geometric objects. If you are keen you can read up on the Simple Features Specification at:
The above illustrations are very simple, and spatial objects are much more involved, but you can see that the arrangement of points, lines and polygons constitute the basic data model.
In your own folders you have a method by which you like to place your data. If you use shape files, they may be organized by topic or by geographical location or by features type. This is user modelled and controlled. If you use an ESRI File Based GeoDatabase , then you are making use of rules, procedures and a data model that software has been written to make use of.
Loading and managing of data into the data structure
We exampled the use of File Based GeoDatabase and Spatial Lite. Both of these methods allowed us to use an existing structure to place our data into. This is not a database management system, but rather a container to place your objects into. This also allows software to access data, but it also allows users to make use of the structure to incorporate rules to better control or extent the quality of data. A good example of this is to be able to incorporate topology into your data management (clean data with rules describing the topologty between layers). There is also the ability to define relationships between layers (explained more tin the RDBMS section).
An older way of modelling data that provided a model, structure and even a relational approach to managing spatial data was the ESRI coverage. It provides and nice method for defining the relationship between points. lines and polygons in a face, edge and node model. An older lecture from Oregon State University shows this older model to think of maps as numbers.
The intro to topolgy from ESRI is also a good read on how data is managed now and then.
Loading data into a relational database
As we practiced in the lab, you can use a full fledged Relations Database Management System (RDBMS) for your GIS Database needs. This allows users to accomplish all the stages above as well as using the power of a RDBMS to expand the use and accessibility of spatial data. This incorporates all the above concepts (Data Structures, Data Models, rules and relationships) as well as having its own set of abilities and practices. By using a RDBMS you get benefits such as:
- Organize your data: Much like creating your own directories, you can determine what structure the data is in, how it is modelled and how features and layers are related
- Protects the data : RDBMS have methods for protecting data (Constraints, rules and hierarchical frameworks) that users and software or users cannot easily alter
- Allows more than storage: A RDBMS provides a foundation for developing all sorts of interactions with the data (like application development) that data models such as GeoDatabase cannot.
- Data can be manipulated or structured in such a way to optimize its use and performance: Essentially you can break the data down into pieces and then rebuild it in a fashion that suits your work.
- GeoSpatial operations can be performed within the database: As we learned in the lab, we can use the built in functions of some databases to perform a wide variety of GIS procedures (i.e PostGIS functions)
A few concepts to be aware of for using a RDBMS
Suppose you have a variety fo polygons in one or many layers, but they refer to a set of attributes that are identical. For example you could be creating a treatment for pesticides in the cutblocks. This treatment is the same for many of the treatments. Rather than repeating the same set of attributes for many polygons, you can “link” a single row in another table.
Relationship amongst data in tables
Similar to joins in software whereby you can join a table to another, relational databases excel at a variety of methods of joining tables (hence the term Relational in the name). This establishes a dynamic or consistent (flexible) methods to have multiple attributes related to many other attributes in as many tables as the user wishes.
The use of constraints allows users to protect there data. It allow rules to be placed on tables and their subsequent relationships whereby data access and modfication have to follow theses rules in order to make use of the data.
Serial numbers and indexes
Serial numbers are like the Unique Id associated with each feature in a layer/shapefile), and indexes are similar to those built in the shx file of a shapefile. These serials are a great way to ensure you are recording and linking your tables together in a meaningful manner, and indexes can be applied to any column in tables in a database..