You are on page 1of 17

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/274955240

RDBMS -an introduction to Relational Database Management Systems.


Adams, Till (2002): Advanced User Guide. Digital publication in: Riede, K.
(2004): Global Register of Migratory Sp...

Technical Report · January 2002


DOI: 10.13140/RG.2.1.1510.3520

CITATIONS READS

0 1,464

2 authors, including:

Klaus Riede
Research Museum Alexander Koenig
148 PUBLICATIONS   1,242 CITATIONS   

SEE PROFILE

Some of the authors of this publication are also working on these related projects:

AmiBio View project

Bioacoustics and songs of grasshoppers (Orthoptera) from Southern South America View project

All content following this page was uploaded by Klaus Riede on 14 April 2015.

The user has requested enhancement of the downloaded file.


GROMS Workshop

terrestris, H. Paulsen & T. Adams GbR

This document should be cited as:

Adams, Till (2002): Advanced User Guide. Digital publication in: Riede, K. (2004):
Global Register of Migratory Species - from Global to Regional Scales. Münster
(Landwirtschaftsverlag), on enclosed CD-ROM under: /biblio/PowerUserGuide.pdf
GROMS * GIS and Databases *

1. RDBMS - an introduction to Relational Database Management Systems

What is a RDBMS ?
A database is the centralisation of objects, which serve as a solution for special tasks or in other
words, a database is a collection of data that is organized so that its contents can easily be
accessed, managed, and updated.
The coping of these tasks could be reached best, when these tasks are formulated in a brief
manner before designing the database.
Famous database software is Microsoft access, ORACLE, MySQL or PostgreSQL - the last two
mentioned are open source software. This means there are no license costs and the user is able to
see the source code of the software and is totally free in his decisions how to use the software.

Relational databases
A relational database is a collection of data items organized as a set of formally-described tables
from which data can be accessed or reassembled in many different ways, without having to
reorganize the database
tables. In other words a
relational database is a set
of tables containing data
fitted into predefined
categories. Each table
(which is sometimes called
a relation) contains one or
more data categories in
columns and each row
contains a unique instance
of data for the categories
defined by the columns.

When creating a relational


database, you can define
the domain of possible
values in a data column and further constraints that may apply to that data value. Talking about
individual elements in a database, this could be a species, a geo-object etc the term. entity is used
very often. Entities may have attributes and relationships to each other.

Database management systems


A database management system organizes and analyses databases. A relational database
management system (RDBMS) is a program that lets you create, update and administer a
relational database. The database is built up from entities. An entity is an individual element in a
database, this could be a species, a geo-object etc. Entities have attributes and can have
relationships to each other.

Why should we use RDBMS ?


There are some reasons that must be mentioned when arguing for the application of RDBMS.
First of all, storing related information within different tables avoids redundancy and spelling
errors and the data-sheme allows a more efficient data entry into the database.
The data itsself is easy to access through Graphical User Interfaces (GUI), which could easily be
made. This allows many users to access the data and every user has individual access rights, e.g.
reading, writing.

2
GROMS * GIS and Databases *

RDBMS have a standarized query language (SQL) which helps getting the information wanted
out of the database. SQL also allows data exchange between different databases and even
between databases stored in different systems.

Tables and Relations


All the data within a database is stored in
tables. A database may consist of as
many tables as required. A table consists
of rows and columns, where a column
represents an attribute and a row stores a
dataset (see figure above).
All connections between tables (entities)
of different types are termed relationships.
A relational table can be viewed as
representing an entity type with rows
representing single entities of that type. The
relations are based on one attribute in a
table which corresponds to an attribute in the connected or related table.

There are three types of relationships between tables:


1:1 one dataset in table A has allocated one dataset in table B
1 : n / n : 1 one dataset in table A has allocated many datasets in table B and vice versa
n:m many datasets in table A are allocated many datasets in table B

Conceptual preparation of a RDBMS


In order to prepare the concept of a database, before the database itsself is implemented an
E - R - Diagram is designed. This shows the entities and their relations in a diagram and allows an
cear overview over the single elements and their relations stored in the database. An E_R
diagram also is user to get a good insight into an existing database. An E-R diagram consists of
the following elements:

Elements:

Type of Entity Attribute Relationship

Relations: 1:1
1:n
m:n

There are three steps for designing the E - R - Diagram:

3
GROMS * GIS and Databases *

Dimensioning of the entities

Dimensioning of the relationships

Allocation of attributes

SQL - Structured Query Language


The standard user and application program interface to a relational database is the structured query
language - short: SQL. SQL commands, which are also called SQL-statements, are used both for
interactive queries for information from a relational database and for gathering data for reports.
SQL is a standard interactive and programming language for getting information from and
updating a database. Although SQL is both an ANSI* and an ISO** standard, many database
products support SQL with proprietary extensions to the standard language. Queries take the
form of a command language that lets you select, insert, update, find out the location of data, and
so forth. There is also a programming interface.
* American National Standards Institute ** worldwide federation of national standards

SQL is used for all types of database activities by all types of users including:
• system administrators
• database administrators
• security administrators
• application programmers
• decision support system personnel
• many other types of end users

4
GROMS * GIS and Databases *

SQL provides easy-to-learn commands that are both consistent and applicable for all users. The
basic SQL commands can be learned in a few hours and even the most advanced commands can
be mastered in a few days.

There is additional information on SQL on these webpages:


http://www.sqlcourse.com/
http://www.w3schools.com/sql/default.asp
http://www.contrib.andrew.cmu.edu/~shadow/sql.html

In the following single SQL statements are broken down into parts in order to show their
functionality.

SQL Queries - an example


With SQL, we can Query a database and have a Result returned in a tabular form.
A Query like this:
SELECT DISTINCT Tab_Arten.English FROM Tab_Arten
Will give a Result like this:
Tab_Arten.English
Bottlenosed dolphin
...

SQL Queries - another example


SELECT DISTINCT Tab_Arten.ID, Tab_Arten.Latein, Tab_Arten.Englisch,
Tab_Arten.Deutsch, Tab_Arten.Franzoesisch, Tab_Arten.Spanisch,
Tab_Arten.Important_Synonym, Tab_Arten.SPEC_CAT, Tab_Arten.CITES,
Tab_Familien.Ordnung, Tab_Arten.Familie, Tab_Arten.CMS_Status, Tab_Arten.CMS,
Tab_Arten.RL2K, Tab_Arten.Migration, Tab_Arten.Animal_Class,
Suptab_Class_X.Animal_Class FROM (Tab_Arten INNER JOIN Tab_Familien ON
Tab_Arten.Familie = Tab_Familien.Latein) INNER JOIN Suptab_Class_X ON
Tab_Arten.Animal_Class = Suptab_Class_X.ID WHERE Tab_Arten.Animal_Class= 2 AND
Tab_Arten.animalgroup= 'Pheasants, bustards, sandgrouse, buttonquails' ORDER BY
Tab_Arten.Latein;

SELECT DISTINCT Tab_Arten.ID, ... , Suptab_Class_X.Animal_Class FROM

SELECT calls matching attributes from „Tab_Arten“ and column „ID“ , ... and returns data as
a group of datasets. DISTINCT returns only one copy of each set of duplicate rows selected
FROM calls the tables and queries, in which the fields performed in the SELECT statement are
included. Every SELECT statement must have a FROM statement.

FROM (Tab_Arten INNER JOIN Tab_Familien ON Tab_Arten.Familie =


Tab_Familien.Latein)

INNER JOIN combines datasets from two tables, if a common field contents
the same values ON gives the tables and attributes, on which the combination should be based
= is the operator

INNER JOIN Suptab_Class_X ON Tab_Arten.Animal_Class = Suptab_Class_X.ID WHERE


Tab_Arten.Animal_Class= 2 AND Tab_Arten.animalgroup= 'Pheasants, bustards, sandgrouse,
buttonquails' ORDER BY Tab_Arten.Latein;

5
GROMS * GIS and Databases *

WHERE defines a set of criteria, which must be fulfilled by the demanded


datasets so that they are admitted into the query result.

AND logical expression that requires both argumkents to be fulfilled

ORDER BY sorts the resulting datasets of a query on one or more fields

6
GROMS * GIS and Databases *

2. Introduction to ArcExplorer

ArcExplorer is a ....
... free GIS map viewing Software by ESRI which allows to view, browse and
query GIS data and to roganize it in maps - just like those which are
delivered on the GROMS-CD.

On the ESRI homepage (http://www.esri.com) we can find another explanation of ArcExplorer:

“ArcExplorer is a lightweight GIS data viewer developed by ESRI. This freely available software offers an easy
way to perform basic GIS functions. ArcExplorer is used for a variety of display, query, and data retrieval
applications and supports a wide variety of standard data sources. It can be used on its own with local data sets or
as a client to Internet data and map servers. Among its many uses, ArcExplorer is an excellent vehicle for
publishing your data. You can distribute the ArcExplorer setup and your data on CDs. Users can then use the
CD to install ArcExplorer on their machines and view your data easily and effectively.”

Very important note!


There are two versions of ArcExplorer, which mean different types of software. The software
described here is the version 2.0, which is also delivered with the GROMS CD. Version 4.0 is a
java-viewer, which allows to view AXL-files (an ESRI special derivate of the web hypertext
language XML) and GIS data from the internet. This one is not suitable for our purposes here.

The main functions of ArcExplorer are:


• Load geodata as shapefiles, ArcInfo coverages and ArcSDE-Layers
• Explore geodata with zoom and pan tools
• Measure distances
• Symbolize data based on attributes
• Search for single objects
• Query single objects
• Query the attribute-data based on SQL statements
• Save the project where all elements in the actual view are stored in a project-file.

There is no possibility to link ArcExplorer directly to data stored in the database, e.g. data
coming from a MS-Access database. Therefore a "real" GIS is required, e.g. ArcView GIS 3.x.
ArcExplorer projects have the ending *.aep and are also saved as ready-to-use projects on the
GROMS-CD. ArcExplorer projects don't store any geodata, but only the reprimonds to the data!

7
GROMS * GIS and Databases *

3. Open GIS components support Biodiversity issues

Introduction: DOrSa Web Map Server Demo

DORSA (abbreviation for Deutsche Orthopteren-Sammlungen = German Orthoptera


Collections) will provide database access to important collections of Orthoptera (crickets and
grasshoppers) in German research collections. DORSA will function as a prototype for an
internet-based link between an existing Global Species Register and a specimen-based database,
including geo-referenced localities and multimedia information such as pictures, video-files and
especially songs. Specimen-based information from different institutions will be integrated within
a single database, creating one "Virtual Museum Collection", accessible by an internet-based user
interface. DORSA will be accessible from any part of the world, which is important for potential
users in species-rich, but resource-poor developing countries with incipient biodiversity
infrastructure.
DORSA uses an Open GIS compliant Web Map Server (WMS) to distribute specimen
information and their spatial distribution (see Figure 1). The WMS is implemented by using the
technology of the open source/free software project deegree. deegree is a Java Framework that
allows to build spatial applications ranging from desktop clients to Web Services.

Map functions

dynamic
Legend area

Layer
management

Select Datasource
and add Layers

Figure 1: DORSA Web Map Server Client

8
GROMS * GIS and Databases *

What are the main features of the DORSA Web Map Server Client?
- integrate different types of data sources (grid coverages, ESRI shape files, JDBC/ODBC-
compliant databases) by configuring the capabilities of the WMS
- uses Open GIS Web Map Services Implementation Specification (Version 1.0.0)
conformant Requests: GetMap and GetFeatureInfo
The service can be integrated in any existing WMS architecture and is able to add
layers from any other WMS which serves the same location (in terms of Spatial
Reference System and Bounding Box)
- Legend graphics are produced dynamically

Modern Components of interoperable GI-Architectures support Biodiversity issues

The field of Biodiversity has do deal with heterogenous types of information. The data sources –
as for any other complex information community - are syntactically and semantically
heterogenous, e.g.:
- syntactically: various data formats, databases, operating systems, network technologies
and institutions
- semantically: taxonomy and other thesaurus efforts: same things are named and
organized differently, different concepts and paradigmas have to be harmonized

The Open GIS Consortium (OGC) works on such interoperability issues for the spatial
information community:

“OGC is an international industry consortium of more than 220 companies, government agencies and universities
participating in a consensus process to develop publicly available geoprocessing specifications. Open interfaces and
protocols defined by OpenGIS® Specifications support interoperable solutions that "geo-enable" the Web, wireless
and location-based services, and mainstream IT, and empower technology developers to make complex spatial
information and services accessible and useful with all kinds of applications.”

The OGC cooperates with other important international standardizing institutions e.g. like the
International Standards Organisation (ISO) or the World Wide Web Consortium.

Important (Pre-)Specifications1, their purposes and most important request types:


- Web Map Service (WMS):
Purpose: Distribute maps as images (GetMap) and simple feature information
(GetFeatureInfo) via http-Protocol.
- Web Coverage Service (WCS):
Purpose: The WCS supports the networked interchange of geospatial data as "coverages"
containing values or properties of geographic locations. Unlike the Web Map Service
(WMS), which filters and portrays spatial data to return static maps (server-rendered as
pictures), the Web Coverage Service provides access to intact (unrendered) geospatial
information (e.g. triangulated irregular networks, grid), as needed for client-side rendering,
multi-valued coverages, and input into scientific models and other clients beyond simple
viewers.
- Web Feature Service (WFS):
Purpose: Provide direct access to spatial features (GetFeature) - using GML (Geography
Markup Language) - and their schema (GetFeatureType). Web Feature Server optionally
allow to edit data using transactions.
- Web Coordinate Transformation Service:

1 some of them are not adopted yet by the OGC, but are soon to come

9
GROMS * GIS and Databases *

Purpose: Transform geodata from its originally Spatial Refernce System (SRS) to a
dedicated target SRS.
- Catalog Service:
Purpose: A Catalog is a registry for Metadata, both for data and services. The metadata
schemas are specified as ISO standards 19115 and 19119. A Catalog service allows the
discovery, access and management of geospatial data and services.
- Gazetteer Service (Profile/Specialization of WFS)
Purpose: Deals with spatial referencing by geographic identifiers. Query, insert, and update
location instances in a gazetteer database.
Get or Query features based on thesaurus-specific properties (broader term (BT), narrower
term (NT), related term (RT)
Retrieve properties of the gazetteer database, such as the location instance, location type
class definitions and the spatial reference system definitions

The efforts of the Open GIS Consortium, especially the Implementation specifications, should
be considered when to design and deploy architectures for interoperable information systems
that work with spatial data.

10
GROMS * GIS and Databases *

4. Databases and GIS

Databases and GIS


In principle there are two ways to store geodata
• Store attribute data AND geodata in a database
• Store only attributes in database and geodata on a local file system

The first way is the more clever one, because the attributes are always up to date and data
redundancy is avoided. This is a very important point - e.g.: In an administration many users need
to view geodata, which is produced by a special department in this administration. In a database
we can give special access rights on special datasets - e.g. "read" for "viewers" and "write" for
editors of the data. If the geometrie of some objects is changed, and anybody in this
administration loads the data into his GIS project, he will always have the up-to-date data.

Anyhow it must be balanced if the additional expenditure must be made, if the amount of data is
very small. In more complex databases the storage of geometry and attributes, even of raster-data
is possible. Soem database companies offer special extensions, e.g. Oracle Spatial for Oracle
databases which serve as a spatial extension in the database. The ArcSDE (Spatial Database
Engine) from Esri is another solution to make geodatabases accessible through a GIS. The
ArcSDE "sits" on the database and serves for a fast and easy access to the geodata.

ODBC
Before we can access a database via ArcView GIS we have to set up an ODBC connection. The
Open DataBase Connectivity must be set up in control panel. In an ODBC connection there is
informations stored which informs the GIS, how the datasource is connected. ODBC is a MS-
specification which serves as an interface between datasource and querying program (e.g. GIS).

In our case the geometry is stored on the local file system. In ArcView it is possible to connect
tables, queried from a database with these shapefiles. There are two ways to connect geometry
and attributes:

Joining:
Write attributes from a source table into another table e.g. table species in table species_country.
Joining is based on 1 : 1 or 1 : n relation.

Linking:
Associate Attributes from a source table into another table e.g. table species_country to countries
attribute table. Linking is based on 1 : n.

11
GROMS * GIS and Databases *

5. Introduction to ArcView GIS 3.x

These topics are discussed:


• What is GIS ?
• GIS Data types
• Projections in GIS
• Architecture of ArcView GIS - the GUIs
• Working with ArcView GIS
• Intersections
• Database connections and linking tables
• Data import and where do I get Geodata?
• Excursion: Diversity maps & Projections
• Layouts

“Any information has a spatial


reference."

Geographical Information Systems (GIS)


make the spatial dimension of data
accessible and create a new quality of
informations.

Geographical Information Systems are


useful for processing data with a spatial
context. A lot of this data can be used to
generate a new quality of information
which cannot be done
without a GIS.

Geographical Information Systems are


increasingly being used in various branches of the economy, i.e. helping to find new locations for
businesses, streamlining paths to the customer as well as illustrating complex contexts.

Dataformats:

Rasterdata:
-Satellite- and Aerialphotographs,
Photographs and Bitmaps.
-based on a raster
Vectordata
-Data of high accuracy
-Points, lines and areas
-describe the geometry of objects

Components of geodata
Geometry - describes the geographical
object as well as it’s location on the earth-
surface. In contrary to a CAD system such

12
GROMS * GIS and Databases *

geoobjects are abstracted and displayed as points, lines and areas.


Attributedata - these objects have attributes or describing information
Behaviour - these objects are allocated special behaviours, e.g. symbols or labels. This behaviour
represents the object when displayed.

13
GROMS * GIS and Databases *

Projections in GIS
Back to our first statement: “Any information has a spatial reference."...

The simplest way to define a spatial reference is a system of three orthogonal axis whose
beginning is in the center of the earth (geocentric system). GPS – measurements may deliver such
coordinates.
In all other cases the shape of the underlying model of the earth is important.

Reference Systems
Reference systems are one of the main important properties of
geodata.
Questions like:
Where? How far? How big?
Couldn’t be replied without a consistent reference system. In GIS
this is done by coordinate-systems. They apply to three kinds of
reference- surfaces:
• plain area
• globe or rotational spheroid
• geoid

An “ideal earth surface” is constructed by elongating the sea-surface under the continents. But: It
is impossilbe to realize this in a perfect manner. From satellite-measurements two geoids were
constructed:
WGS (World Geodetic System) / GRS-1980 (Geodetic Reference System)
Normally local/regional spheroids are used. They are adapted to the local shape of the earth and
are the best approximation to the real earth surface in their region. They are named (Rotational-)
Spheroids.
• USA: Clarke-1866-Ellipsoid
• Russia: Krasovsky-Ellipsoid
• Germany: Bessel-Ellipsoid

Geodetic datum
The geodetic datum describes the location, orientation and size of the reference surface in relation to
the earths’ center and a therein contained coordinate system. This is normally defined through
the earths’ axis, the equator and the prime meridian (e.g. Greenwich).

Reference Systems

14
GROMS * GIS and Databases *

ArcView GIS
ArcView GIS is one of the most successfull desktop GIS in the world and ...
• an open system for access, display and query of spatial referenced data (geodata)
• a tool for analyzing geodata, calculating tables and for producing thematic maps
• integration of different components of informatiotechnology in one GIS

ArcView makes it easy to create maps and add your own data to them. Using ArcView software's
powerful visualization tools, you can access records from existing databases and display them on
maps.

In the figure you see the hierarchical structure of ArcView GIS. ArcView GIS is object-based,
which means that the objects are in a hierarchical order and every object has it's properties and
behaviour. Once this is understood, it is really easy to learn ArcView GIS.

Extensions
ArcView GIS functionality could be increased by loading extensions. ArcView 3.x extensions
make it easy to add new features to ArcView 3.x. Extensions are plug-ins that you can load and
unload as you need them.

There are many user-contributed free extensions on the esri-homepage. To use them they must
be copied into the ^directory C:\ESRI\AV_GIS30\ARCVIEW\EXT32.

15
GROMS * GIS and Databases *

References

terrestris: http://www.terrestris.de
deegree project: http://www.deegree.org
DorSa: http://www.dorsa.de
lat/lon Fitzke, Fretter, Poth GbR: http://www.lat-lon.de
Open GIS Consortium: http://www.opengis.org
http://www.esri.com/data/online/esri/wobmselect.html
Free geodata: www.gisdatadepot.com

Help on MS Acceess:
http://www.access-programmers.co.uk/
http://accessadvisor.net/
http://support.microsoft.com/default.aspx?scid=fh;EN-US;kbhowto&sd=SO&ln=EN-
US&FR=0

Help on SQL:
http://info-it.umsystem.edu/oracle/svslr/svslr.1.toc.html
-- see chapter SQL --

Help on ArcView GIS:


www.esri.com > "support"
ArcScripts and Extensions: s.a. > "ArcScripts"
ArcView GIS mailing list: arcview@lists.directionsmag.com

GIS-Tutorials:
http://www.gisdevelopment.net/tutorials/ (GIS across the board)
http://www.gis-tutor.de/ (in german only)

Free Geodata:
www.GeographyNetwork.com
www.gisdatadepot.com
http://www.maproom.psu.edu/dcw/

Contact:

Dipl. Geogr. Till Adams Dipl. Geogr. Klaus Fretter Dr. Klaus Riede
terrestris, Paulsen&Adams GbR lat/lon Fitzke/Fretter/Poth GbR ZEFb (Center for Development
Meckenheimer Allee 166 Meckenheimer Allee 176 Research)
53115 Bonn 53115 Bonn Walter-Flex-Str. 3, D-53113 Bonn
GERMANY GERMANY GERMANY
phone ++49 +228 73 9647 phone ++49 +228 73-2831 phone ++49 +228/731872,
+228/9122234
fax ++49 +228 73 6538 fax -2153 fax ++49 +228/731869
email: adamsn@terrestris.de email: fretter@lat-lon.de email k.riede.zfmk@uni-bonn.de
http://www.terrestris.de www http://www.lat-lon.de http://www.groms.de/

sponsored by BMU – www.bmu.de -

16

View publication stats

You might also like