Spatial Database Systems

J Mwaura

Lecture 3: Database Models and Data Modeling

Spatial Database Systems

J Mwaura

Realms of representation modeling in GIS

Three realms of representation provide comprehensive understanding of data and information

  1. Worldview - people discuss issues and problems about the world
  2. Database - people translate that conceptual understanding into means for data structuring and storage
  3. Map analysis/display - people manipulate the data stored on disk and form a computer display or printed output

Data, Information, Evidence and Knowledge

Data - observations on a reality, whatever it might seem to be

Information - data placed in a meaningful context for use from which new insight about a topic can be gained

Evidence - corroborated information that strengthens our trust in the information since others agree on the interpretation

Knowledge - evidence placed in a framework for use that allows us to take action in a repeated manner

The three realms help us use geospatial data to develop geospatial information that is used to think about and create evidence and knowledge

The Process of Data Modelling

Database Model, Schema and Instance

Relationship between a database model, a database schema and an instance of a data object

Database Model, Schema and Instance

Schema

  • A schema in database design is a representation of a specific portion of the real world, built using a database model
  • Or is a static, time-invariant collection of linguistic and graphical representations that describe the data structure of a database and database processing operations

Instance

  • An instance is an occurrence of a data object in a database
  • Or is a dynamic, time-variant collection of data that conform to the data structure specified by a database schema

Conceptual Data Modelling

This is a process where the database designer or data modeller abstracts the properties of real world features that are relevant to the purposes of a database and, excludes those that are not

There are 3 types of data abstraction in conceptual data modelling (Batini et al.,1992):

  • Classification/Thematic abstraction - define one concept as a class of real world features characterised by common properties.
  • Aggregation abstraction - defines a new class from one or more sets of other classes that represent its component parts
  • Generalisation abstraction - defines a set-to-subset relationship between the elements of one or more classes

Conceptual Model

An entity-relationship (ER) diagram

Logical Data Modelling

In logical database design, each real world feature identified in the conceptual modelling phase becomes the name of a relational table, and each of the characteristics becomes the header of the columns in this relational table

To identify primary, secondary and foreign keys (PK, SK, and FK respectively)

Logical Model

A relational logical schema

Physical Modelling

Physical modelling is a more complex and technical process, it requires competency in using both the DBMS and the hardware system used to install the database

Physical Model

A portion of the physical model

Importance of Database Models and Data Modelling

Provides the means for the database designer to consolidate user requirements, test design concepts, compare alternatives and visualise what the database will be like when it is completed

Provides the rules and tools to document design decisions and the final implementation specifications

It's a communications tool to facilitate the interaction between the database sponsor, designer, developer and end users

Database designer is able to overcome human limitations to comprehend and solve the real world problems that a database is designed to address

Database Models

Entity-relationship (ER) Model

Relational Model

Object-oriented (OO) Model

Object-relational (OR) Model

Entity-Relationship (ER) Model

E/R model uses diagrams to express and describe its concepts

Communication tool between stakeholders in the problem domain (e.g. users) and those in the technical domain (e.g. designers)

Its objective is to identify the entities, their relationships, and the attributes required by database users

Entity-Relationship (ER) Model

entity/data object/object - is a real world feature or phenomenon that has an independent existence but it can also represent an abstract concept

relationship - is an association between entities. It must be uniquely identifiable, and is given a name that describes its function (e.g., belongs_to, managed_by, has, etc.)

attribute - a characteristic or property of an entity or a relationship

ER modelling -> check next slide

Entity-Relationship (ER) Model

Properties of a relationship in an ER model

  • Cardinality - denotes the number of occurrences of the entities participating in a relationship
  • Optionality - denotes whether the relationship is optional or mandatory for either or both participating entities
  • Constraints - are business rules governing a relationship

Entity-Relationship (ER) Model

An attribute in an ER model can be classified in the following ways;

  • Simple or composite attributes
  • Single-valued and multi-valued attributes
  • Derived attributes
  • Keys/indices

Relational Model

In the relational model, data are logically structured within tables/relations

It is based on set theory and predicate logic (Codd, 1970 and 1990)

column/field - attributes

row/tuple/record - entity

Relational Model Rules

Integrity constraints; domain, entity and referential constraints

Business rules - conditions that the use of a relational table must satisfy

Normal forms - relationships among the columns of a relational table; 1NF, 2NF, & 3NF

Normalization

Relational Model

Features of a relational table

Workflow of developing a logical schema

Object-Oriented (OO) Model

An object is a conceptually autonomous data item in the computer that represents a real world entity with the ability to act upon itself and to interact with other objects (Rob and Coronel, 2002)

An object is that it is able to act upon itself and interact with other objects. Objects have the following properties

  • Name, Unique identity, Attributes, Object state, base/abstract data type
  • Method, Message, type and Control and business rules

Object-Oriented (OO) Model

Classes are organised into a class hierarchy. Which yields 2 concepts;

  1. inheritance - subclass inherit the data structure and behaviour of superclass
  2. polymorphism - allows individual objects to respond to the same message according to their respective characteristics

OO Class Hierarchy

OO Modelling Process

Structural modelling - determines attributes and operations of identified things, and their association and interdependencies

Behavioural modelling - determines methods and messages associated with objects

Architectural modelling - models user interfaces, data files and tables, executables and code libraries, and the mapping between the logical and physical aspects

OO modelling

Workflow of OO modelling

Object-Relational (OR) Model

A database constructed using a relational database model with object-oriented extensions

Characteristics of object-oriented extensions;

  • User-defined data types
  • User-defined functions
  • User-defined access methods
  • An extensible optimiser

Principles of Data Modelling

  • The choice of a model has a profound influence on how a problem is approached and how a solution is formed
  • Every model may be expressed at different levels of precision
  • The best models are connected to reality
  • No single model is sufficient and every non-trivial system is best approached through a small set of nearly independent models

Systems and Database Development Life Cycle

Assignment

End of Lecture 3

Spatial Databases

That's it!

Queries about this Lesson, please send them to: jmwaura@jkuat.ac.ke

*References*

  • Database Systems: Design, Implementation, and Project Management, Springer. Albert K W Yeung & G. Brent Hall
  • Database Systems: Design, Implementation, and Management, 12th ed. Carlos Coronel & Steven Morris
  • Database Modeling and Design; Logical Design, 5th ed. Taby Teorey et.al
  • Fundamentals of database systems, 6th ed. Ramez Elmasri & Shamkant B. Navathe
Courtesy of