0% found this document useful (0 votes)
15 views30 pages

Part IV - Spatial Analysis in Vector GIS and DBMS (

Uploaded by

Dawit g/kidan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views30 pages

Part IV - Spatial Analysis in Vector GIS and DBMS (

Uploaded by

Dawit g/kidan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 30

DBMS (Data base management

system)
Chapter Four

1
Introduction
• Possibilities for spatial analysis, and the way certain
types of analysis are performed, may strongly vary
depending on the software used and the way the
data are organized within the GIS in vector data
model.
• Initially most software tools for vector GIS were
based on a hybrid data model, that is characterized
by: 2
Hybrid data model characterized by:
• Separate storage and treatment of spatial and
non-spatial data:
– Non-spatial data are stored in simple attribute
tables (one table for each object class) or in a
relational database, consisting of a set of tables that
are logically linked by way of key attributes.
– Spatial data (position and topology) are stored in a
vendor-dependent data structure, that may contain
topological information or not (based on a
spaghetti- or topological data model.
• Grouping of data in various thematic layers, that
are defined in the same reference system, but are
independent from each other. 3
…cont’d
• More recent developments in GIS have led to the use
of integrated data models, with spatial and non-
spatial data stored together in one database, usually
of the object-relational type.
• This leads to more data integrity, and allows some
degree of standardization in the way data are stored,
exchanged and analyzed.

4
…cont’d

Linking of spatial and non-spatial data in a vector GIS


5
Organization of thematic data
• Storage and treatment of non-spatial data in a vector
GIS is usually based on a relational data model.
– Defining such a model is accomplished in two
steps: a conceptual and a logical phase.
• Conceptual phase: object classes, features of object
classes (attributes) and relational classes, that are
relevant in the context of an application, are
identified and a conceptual scheme is developed.
• The technique, which is supported by a specific
graphic formalism, is known as E-R modeling (entity
relationship modeling) and was introduced by Chen
in 1977. 6
…cont’d
• The entity classes are represented by a rectangle,
that carries the name of the class and the names of
the attributes, including the identification code (ID),
which is usually underlined.
• Each entity of a class that will be included in the
database is called an instance of that entity class.
• The relational classes, defined between two or more
entity classes, are represented by an ellipse, that
carries the name of the relational class and the
names of possible attributes of that relational class.

7
…cont’d
• The cardinality of an entity with respect to a
relational class indicates in how many instances of
the relational class the entity occurs.
• The minimal and maximal cardinality that is
theoretically possible for all the entities that can be
part of an entity class is explicitly mentioned in the E-
R scheme.
– Frequently occurring pairs of minimum and
maximum cardinality are (0,1), (1,1), (0,n), (1,n).
– A minimum cardinality of 0 indicates that some
instances of an entity class may not participate in
an instance of the relational class.
8
…cont’d
• A minimum cardinality of 1 indicates that each
instance of an entity will participate in at least one
instance of the relational class.
• A maximum cardinality of 1 indicates functional
dependency.
• A maximum cardinality of n indicates that some
instances of an entity class may participate in more
than one instance of a relational class, without
knowing a priori how many.

9
…cont’d
Minimal Maximal
0 Instance may not
participate

1 Instance always Instance participates


participates only once

n Does not occur Instance may participate


frequently ! more than once

10
…cont’d

11
12
13
14
…cont’d
• Logical phase: a conceptual data model cannot be
directly implemented in a digital environment, but first
needs to be transformed into a logical model, that takes
into account the type of DBMS (Data Base Management
System) that will be used for implementing the
database. Each type of DBMS makes use of specific
structural elements (e.g. tables, lists,...).
– More than 95% of the data that are currently stored
in databases are handled by relational DBMS. Well-
known examples of RDBMS software are: IBM DB2,
Informix Dynamic Server, Microsoft Access, Microsoft
SQL server, Oracle Universal Server.

15
…cont’d
• Each relational database consists of a collection of
tables. Each table corresponds to an entity class or a
relational class, defined between two or more entity
classes (using E-R terminology).
• The rows of a table correspond to the instances of an
entity class or a relational class, the columns to the
attributes that characterize the entity class or the
relational class.
• The transformation of an E-R model into a relational
model is relatively simple:
– Each entity class is transformed into a table. The
identification code of the entity class is defined as
primary key of the table. 16
…cont’d

• Each relational class of the (x-n)-(x-n) type (many-to-


many relation) is transformed into a relational table. The
identification codes of the entity classes that are part of
the relation define the composed primary key of the
table.
• Relational classes of the (x-1)-(x-n) type (one-to-many
relations) are not transformed into a separate table. The
functional dependency leads to the addition of extra
attributes to the table that corresponds with the entity
class with cardinality (x-1):
• The primary key of the entity class with cardinality (x-n)
is added as foreign key (indicated by #) to the table of
the entity class with cardinality (x-1).
• Attributes of the relational class are also added to the 17
…cont’d

18
19
…cont’d
• Manipulating non-spatial (thematic) data that are
stored in a relational database is accomplished by
means of a standard query language called SQL
(Structured Query Language). The language is used
for:
– The creation of the database (e.g. CREATE TABLE)
– Adding data to or deleting data from one of the
tables (INSERT, DELETE)
– Modifying the characteristics (attributes) of one or
more instances in a table (UPDATE)
– Querying the database (SELECT).

20
…cont’d
• The SELECT-command, which is the main tool for
querying the database, has the following structure:
SELECT (list of attributes)
FROM (list of tables)
{WHERE condition}
• The condition (also called predicate) has the form of
a Boolean expression, that can take the values “true”
or “false”.
• Simple Boolean expressions can be combined by
means of logical operators (AND, OR, NOT, NAND,
NOR, XOR). Multiple conditions can be linked to form
more complex, multiple conditions.
21
Querying of thematic data
• Example 1: querying of one table, single
condition
– Database
COUNTRIES (Name_country, Population)
– Question
Which countries have a population of more than
100 million?
– Operation
SELECT Name_country
FROM COUNTRIES
WHERE Population > 100.000.000
22
…cont’d
• Example 2: querying of one table, multiple
condition
– Database
COUNTRIES (Name_country, Population)
– Question
Which countries have a population between 10
and 50 million?
– Operation
SELECT Name_country
FROM COUNTRIES
WHERE Population > 10.000.000 AND Population <
50.000.000 23
…cont’d
• In most relational DBMS simple queries can be
performed using menu-driven, user-friendly search
robots and do not require knowledge of SQL.
However, if one wants to perform more complex
queries one will have to make use of the more
extended search options of SQL.
• In GIS-software the result of a thematic query
(selection) cannot be shown in tabular format only,
yet also in map format, that is if the selection refers
to a set of spatial entities, of which the geometry is
stored in the database. In that case the map may:

24
…cont’d
– Simply show the location of the selected entities.
– Show one or more attributes of the selected
entities (for example, by giving each selected
entity a color depending on the value of an
attribute).
• Querying of thematic data can be a purpose in itself.
Very often it, however, it is only a first step in an
analytic process, where entities that fulfil certain
conditions are selected, prior to applying other,
spatial or non-spatial operations on them such as, for
example:

25
…cont’d
– Calculation of a mean attribute value for all
selected entities.
– Calculation of the distance from a set of selected
entities to another entity (for example, distance of
target customers to a branch office of a bank
company).

26
Spatial querying
• Spatial querying, meaning querying based on co-
ordinate information, is part of the specific
functionality of a GIS and includes:
• Determining geometric properties of entities (length,
perimeter, area, shape). Some attributes are often
stored automatically in the database and can be used
as selection criterion or in calculations.
• Spatial selection:
– Selection of all entities of a certain type that are
found within a selection rectangle, or within a
selected entity (containment search).
27
…cont’d
– Selection of all entities of a certain type that are
found within a certain distance (buffer) around a
selected entity or set of entities (distance search).
– This selection method will sometimes require the
explicit creation of buffers around the selected
entities (see further).
– Selection of all entities within one layer that are
adjacent to a selected entity or set of entities or
that are connected with it (topological search).
• Just like with thematic selection, the result of a
spatial query will very often only be one step within
an analytical process, and be the starting point for
further querying or analysis. 28
…cont’d
• Topological operations are an important component
of professional GIS software. It concerns operations
where new spatial entities are created based on
topological and attribute-dependent relations
between existing entities. A distinction can be made
between:
• Topological operations that act on one entity type:
– “Clipping” of the result of a spatial selection
(containment search, distance search), possibly
with a proportional re-distribution of quantitative
attribute values.
– Spatial aggregation of entities based on common
thematic properties.
29
…cont’d

• Topological operations that act on more than one


entity type:
– Intersection (overlay) of two sets of entities,
possibly with a proportional re-distribution of
quantitative attribute values (polygon-on-polygon,
lineon- polygon, line-on-line,...).
• Together with spatial selection methods, topological
operations are the basis for cartographic modelling
and multi-criteria analysis in a vector environment.
The major difference with the raster environment is
that the overlay process works on discrete objects
instead of raster cells. As a result of that only Boolean
criteria or criteria that are measured on a discrete
scale can be used. 30

You might also like