0% found this document useful (0 votes)
405 views43 pages

Spatial Database Management in GIS

This document discusses spatial databases and GIS data structures. It introduces key concepts like entities, attributes, and relationships which make up the logical and conceptual data structures in a spatial database, including the entity-relationship diagram. It describes common data types like points, lines, polygons and how they are structured spatially. The document discusses common operations on spatial data like queries and joins using SQL. It also introduces different file-based data models for storing spatial data and attributes in GIS, such as coverages and shapefiles.

Uploaded by

habte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
405 views43 pages

Spatial Database Management in GIS

This document discusses spatial databases and GIS data structures. It introduces key concepts like entities, attributes, and relationships which make up the logical and conceptual data structures in a spatial database, including the entity-relationship diagram. It describes common data types like points, lines, polygons and how they are structured spatially. The document discusses common operations on spatial data like queries and joins using SQL. It also introduces different file-based data models for storing spatial data and attributes in GIS, such as coverages and shapefiles.

Uploaded by

habte
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd

Spatial Database Management

The GIS Concept


Part 1

1
Entity
Bangor
– Penobscot County,
Maine, United
States
– Centroid -
44.801N , -6778W
– Area 34.4 square
miles
– Elevation – 158 feet
– Population 31,473

2
Physical Database Structure
The physical design of the database specifies
the physical configuration of the database on
the storage media.
– This includes detailed specification of data
elements, data types, indexing options and other
parameters residing in the DBMS data dictionary.
– It is the detailed design of a system that includes
modules & the database's hardware & software
specifications of the system.
[Link]

3
Logical Database Structure
•  Several logical data structures are used to
express the relationships between
individual data elements or records in a
database.
• Common logical data structures are
hierarchical, network, and relational, with
relational being predominant.

4
Conceptual Structure
• The conceptual structure is often
represented as a schema.
• A schema describes the database
structure in a shorthand notation.
• One example is the entity-relationship
(ER) diagram.

5
Entity Relationship Diagram
Rectangles represent entity sets.
ENTITY Diamonds represent relationship
sets.
Lines link attributes to entity sets and
entity sets to relationship sets.
RELATIONSHIP Ellipses represent attributes

Double ellipses represent


multivalued attributes.
Dashed ellipses denote derived
ATTRIBUTE attributes.
Underline indicates primary key
attributes.
6
Entity Relationship Diagram
Name Address Name
ID Phone Number Credits

Student Enrolls In Courses

Major GPA Time Instructor


Advisor Credits Room

7
Entity Relationship Model
• The result is a diagram of all of the entities, their
attributes, and the relationships between entities
– Each entity becomes a table.
• Student table
• Course table
– Each relationship (usually) becomes a table.
• Enrolls, which allows you to join information from both tables.

8
Types of Relationships between
Entities
• 1:1 – one faculty member is assigned to one
office.
• 1:M (M:1) – one faculty member teaches
many courses.
• M:N – many students take many courses.
• All of these relationships can exist between
attribute tables.

9
Table Join

10
Table Joins
• Table joins depend on the data not the
attribute name.
• There are many different types of table
joins.
• Tables can be joined regardless of the
relationship EXCEPT:
– When joining to the feature attribute table in a
GIS, the relationship must be 1:1 or M:1
– Other relationships must use the relate.

11
One-to-One Join
Employee-id Job Employee-id name
1 Digislave 1 Tom
2 Useless Supervisor 2 John

Join Employee-id to Employee-id

After join

Employee-id Job Name

1 Digislave Tom

2 Useless Supervisor John

A join does not permanently alter the table structure


12
Many-to-One Join
Polygon Id Symbol Symbol Description
1 Qa Qa Quaternary Alluvium
2 Qa Qe Quaternary Eolian
3 Pa Pa Permian Abo
4 Qe

After Join on Symbol

Polygon ID Symbol Description

1 Qa Quaternary Alluvium

2 Qa Quaternary Alluvium

3 Pa Permian Abo

4 Qe Quaternary Eolian
13
Relate in a GIS

[Link]
relate_table1.gif

14
Fundamental Building Blocks
Tables comprise the fundamental building blocks of any
database. 

The table above contains the employee information for an organization --


characteristics like name, date of birth and title. 

15
Database Queries
• Queries may be made of one table or
several tables at the same time.
• In many systems querying is facilitated by
icons, or menus, or queries by example
(QBE – a graphical query language ).

16
Structured Query Language
(SQL)
• DDL – Data Definition Language; used to
create and manage the database.
• DDM – Data Manipulation Language; used
to query the database.

17
SQL
• SQL: widely used non-procedural language
– E.g. find the name of the customer with customer-id 192-83-
7465
select [Link]-name
from customer
where [Link]-id = ‘192-83-
7465’
• Application programs generally access databases
through one of
– Language extensions to allow embedded SQL
– Application program interface (e.g. ODBC/JDBC) which
allow SQL queries to be sent to a database

18
Attribute Queries

19
Lecture 8 20
Lecture 8 21
The ArcGIS Attribute Query
Interface
State’s Table is Open

22
23
Table is Open

Options
Related tables
Select by attributes
Switch selection
Clear selection
Zoom to selected
Delete Selected

24
No Table is Open

Selection-
>Select by
Attributes from
the Menu Bar

Lecture 8 25
A Spatial Query in SQL

SELECT [Link], [Link]


FROM city, county
WHERE [Link]=‘Penobscot’ AND
[Link] INSIDE [Link]
[Link]>30000;

26
Spatial Selection

27
Spatial Data
• Spatial data has a structure that does not
necessarily fit with tabular structure.
• To construct a spatial object requires
several table joins.
• Spatial indexing is very different from the
type of indexing used in a relational
database.

28
Spatial Types – OGC Simple Features

Spatial Reference System Composed


Geometry
Type
Relationship

Point Curve Surface GeometryCollection

LineString Polygon MultiSurface MultiCurve MultiPoint

Line LinearRing
MultiPolygon MultiLineString

29
Standard GIS Data Model

Linked
spatial
and
attribute
(tabular)
data.

30
File-based Data Models
Geographic coordinates and attributes
are stored in separate but linked files
Arc
Info
• Coverages • Shapefiles
– Developed for – Developed for
workstation Arc/Info ArcView ~ 1993
~ 1980
– Simpler structure in
– Complex structure,
proprietary format public domain
– Attributes in Info – Attributes in dBase
tables (.dbf) tables
31
Storing Data

Coverages Shapefiles

Maine
Maine

Counties
[Link]
[Link]
[Link]
MCD
[Link]
MCDshx
[Link]
Info

32
Coverages and Shapefiles
– Coverages are stored partially in their own folder and
partially in the common INFO folder.
– Shapefiles are stored in three to five files (with
extensions .shp, .shx, .dbf, .sbx and .sbn).
– Coverages store common boundaries between
polygons only once, to avoid redundancy.
– Shapefiles store all the geometry of each polygon
regardless of redundancy.
– Coverage features are single lines or single polygons.
– Shapefiles allow features to have multiple,
disconnected, intersecting and overlapping components.

33
Geodatabase Model
• Stores geographic coordinates as one attribute
(shape) in a relational database table
• Uses MS Access for “Personal Geodatabase”
(single user)
• Uses a file system for a “File Geodatabse”
(FGDB).
• Uses Oracle, Sybase, Ingress or other commercial
relational databases for “Enterprise
Geodatabases” (many simultaneous users)

34
• There are some differences in queries between
shapefiles and geodatabases
– "STATE_NAME" LIKE 'Miss%' * in a geodatabase
– "OWNER_NAME" LIKE '_atherine smith' ?

– UPPER("LAST_NAME") = 'JONES'
– UCASE ("LAST_NAME") = 'JONES' geodatabase

– "POP2000" IS NULL
– "POP2000" IS NOT NULL

– "HOUSEHOLDS" > "MALES" * ("POP90_SQMI" + "AREA")

Lecture 8 35
The ArcGIS Geodatabase
Key Personal
ArcSDE File Geodatabase
Characteristics Geodatabase

Number of Users Multiuser Single user & small Single userS


workgroups
Storage Format Oracle Each dataset is a Microsoft Access
Microsoft SQL separate file File
Server
IBM DB2
IBM Informix
Versioning Supported Not supported Not supported
Support
Database Full DBMS File system Windows file
Administration functions management system
Tools management

36
Elements of a Geodatabase
Geometric Network

Feature Dataset

Relationship Class

Feature Class

Annotation Class

Object Class
37
Elements of a Geodatabase

• Objects , Object Classes


• Features , Feature Classes
• Feature Datasets
• Validation Rules, Domains
• Relationships , Relationship Classes
• Spatial References
• Geometric Networks

38
Objects and Object Classes

• An object is an instance of an object class


• All objects in an object class have the same
properties and behavior
• An object can be related to other objects via
relationships

39
Object view Relational view

Attribute C olum n, F ield

O bjec t R ow

O bjec t class T able

F eature R ow w ith geom etry colum n

Feature class T able w ith geom etry colum n

R elationship R ow w ith tw o foreign keys

R elationship class T able w ith tw o foreign key colum ns

N etw ork T ables linking elem ents to features

40
Features
• Spatial object
• Location
• Attribute of type Geometry
• Spatial relationships
• Instance of a feature class

41
Feature Classes

• Same type of geometry


• Same type of spatial reference system
• Store spatial objects (features)

42
Feature Datasets
• Container
• Same spatial reference
• Analogous to a coverage

43

Common questions

Powered by AI

A geodatabase integrates spatial data and attribute data management by storing geographic coordinates as a single attribute in relational database tables. It supports storing features like lines or polygons along with their spatial references and enables relationships between different spatial data components . This unification benefits users by offering comprehensive data management tools, supporting multiuser access, and providing robust query capabilities across datasets .

Prominent logical data structures include hierarchical, network, and relational models. The relational model is the most predominant because of its simplicity and efficiency in organizing data into tables, which connect relations directly without needing complex pointer structures . This model supports powerful query languages, such as SQL, that facilitate data manipulation and access across various applications .

Coverages are stored in a format that avoids redundancy by only storing common boundaries once, whereas shapefiles store all the geometry of each polygon even if redundant . Coverages were developed earlier for Arc/Info and are complex, while shapefiles, developed for ArcView, offer simpler, publicly accessible structures . Coverages are single-feature while shapefiles can have features with multiple components, providing flexibility in feature representation.

Geometries such as LineString or MultiPolygon allow spatial databases to accurately represent and manage complex spatial features. These geometries enable detailed modeling of real-world spatial entities, which is vital for applications ranging from mapping to spatial analysis . Their types dictate the spatial relationships and interaction possibilities between different spatial elements, thus affecting how spatial queries and operations are conducted.

SQL plays a fundamental role in database management by offering Data Definition Language (DDL) for database creation and schema management and Data Manipulation Language (DML) for querying and modifying data. SQL's non-procedural nature allows complex queries with minimal syntax. For integration, language extensions enable SQL embedding in application programs, while interfaces like ODBC or JDBC allow sending SQL queries to a database from an application, ensuring versatility in data access and manipulation .

Different geodatabases use specific storage formats tailored to their user access requirements and scalability. A personal geodatabase uses MS Access, suitable for single users with simple data management requirements, while enterprise geodatabases use commercial relational databases like Oracle for multiuser environments, supporting scalability and advanced DBMS functions. File geodatabases utilize a file system for small workgroups, offering ease of management and moderate scalability . These choices balance performance, flexibility, and management complexity according to the operational context of the database.

Joins in GIS directly associate records between tables based on common fields, applicable for 1:1 or M:1 relationships to integrate spatial and attribute data smoothly. Relates, meanwhile, are used where there are M:N relationships, linking tables for queries without merging them, preserving the intricate connections between data sets . For instance, a join is appropriate for linking a city table to a county table by county IDs, whereas a relate is suitable for linking students to courses they are taking, supporting many-to-many relationships .

An entity-relationship diagram comprises rectangles for entities, diamonds for relationships, lines for linking attributes to entities, and ellipses for attributes including special markings for multivalued or derived attributes. Primary key attributes are underlined. This diagram visually represents a database schema by mapping out entities, their attributes, and the relationships between them, thereby providing a conceptual framework for database structure .

Table joins in a GIS depend on data characteristics rather than attribute names. In general, joins can occur across different relationships except when relating to a feature attribute table, which must be either 1:1 or M:1. Other relationships require the use of a relate instead of a direct join . These constraints ensure the integrity of spatial data within GIS systems by maintaining consistent relations between spatial and non-spatial data.

Spatial data is structured not as simple tabular data but requires several table joins to construct a spatial object, such as points, curves, surfaces, etc. Spatial indexing used in spatial data differs significantly from traditional relational indexing methods . This creates unique challenges for data management like ensuring efficient query operations and handling spatially related entities within GIS systems.

You might also like