Modelling the `Real` World

Download Report

Transcript Modelling the `Real` World

44220: Database Design & Implementation
Modelling the ‘Real’ World
Ian Perry
Room: C49
Ext.: 7287
E-mail: [email protected]
http://itsy.co.uk/ac/0506/sem2/44220_DDI/
Last Lecture ended with this …

This Lecture:

Ian Perry
Explores the complex idea of ‘Data Modelling’.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 2
What is this?
Ian Perry
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 3
And this?

Any of the family of aquatic birds,
especially those having short legs,
webbed feet, and a broad blunt bill.
Collins Concise English Dictionary
Ian Perry
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 4
And this?
dTw
 k 1 TE  TW    k 2V  k 3F  TA  TW 
dt
Ian Perry
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 5
And this?
Duck
• What do they have in common?
• They are ALL, depending upon your
information requirements, perfectly
adequate models of a Duck.
Ian Perry
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 6
So, what is a Model?

Always remember that;


They are:





Models ARE NOT the Real thing.
the appearance of reality.
an analogue of the real world.
a simplified representation of reality.
the abstraction of meaning (the semantics).
We build models for a purpose, so;

Ian Perry
being clear as to the purpose of a model is
the key to success.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 7
Every-day Models

Model Duck:


Model Aeroplane:


Purpose; to show shape, colour, size, etc.
Purpose; to show general structure,
identification of parts, flight
characteristics, etc.
Data Model:

Ian Perry
Purpose; the representation of objects of
interest to an enterprise, allowing data to
be structured (i.e. given meaning) and
manipulated (for specific purposes).
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 8
The Data Abstraction Process

Requires us to focus on the critical
aspects of the real world’s richness.


All models require decisions about:


no model is complete!
what to include & what to exclude?
These decisions are represent someone’s
view of a particular reality, i.e.;


Ian Perry
what is important, and MUST be included.
what is not important, and can be left out.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 9
Data Models in the Plural

The complexity of the database design
process means that we must use a
hierarchy of data models:




Conceptual Data Model
Logical Data Model
Physical Data Model
Successful database design requires;

Ian Perry
an orderly, and rigorous, progression
through this ‘Data Modelling Stack’.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 10
The ‘Data Modelling Stack’
Conceptual Overview of things
Logical
Physical
Ian Perry
that are perceived to
be of ‘interest’ in the
‘real’ world.
Data elements & the
relationships between
those elements in a
tabular form.
Actual data held in a
database & the
means to manipulate
that data.
Model of the
Business System.
(ER Model)
Model of Data
Storage Theory
(Db Schema)
Physical
Implementation
(RDBMS)
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 11
Conceptual Data Model

Initial ‘view’ of the Objects of interest;


An integrated ‘view’ of the whole;


which is compromise free AND Software &
Hardware independent.
Conceptual Data Modelling, is all about;


their properties, relationships, semantics.
‘capturing’ WHAT real-world Objects
MUST be included, i.e. to suit a particular
purpose.
We will build Conceptual Models using:

Ian Perry
Entity Relationship (ER) Diagrams
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 12
Logical Data Model

Logical Data Modelling, is all about;


We will build these using:


‘deciding’ HOW to best represent the
properties of the Objects of interest, and
the relationships between them.
Database Schema
A Database Schema:


Ian Perry
defines the single, integrated, data
collection that is the whole database.
within the constraints of a chosen/imposed
theoretical framework.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 13
Theories of Logical Modelling

Several to choose from, e.g.:


Each Logical Modelling Theory comes with its
own:




Hierarchical, Relational, Object-based, etc.
Data Definition Language (DDL)
Data Manipulation Language (DDM)
Data Query Language (DQL)
Software availability tends to influence the
Logical Modelling Theory chosen here:

Ian Perry
As we will be using Microsoft Access (a Relational
DataBase Management System), our logical choice
must be Relational.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 14
Physical Data Model

Physical Data Modelling, is all about;


This process may be influenced by;


‘mapping’ a Logical Data Model onto a specific
Physical Storage System.
both Software specific & Hardware specific
considerations.
i.e. one may have to compromise the Logical
Data Model;

Ian Perry
in order to make it ‘fit’ the Software (in our
case Microsoft Access) that will be used build,
maintain & manipulate the Physical Data Model.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 15
Database Design & Development

Analyse


Develop


a logical data model (constrained by a particular
database theory); from the conceptual data model.
Implement


a conceptual data model; from the above analysis.
Develop


a business situation; in order to ‘discover’ the purpose.
a physical data model (constrained by software
availability); based on the logical data model.
Manipulate

Ian Perry
i.e. test the physical data model; to prove it ‘suits’ the
purpose discovered by the original analysis.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 16
DDI Assessment Method

Assignment 1 (50%) [01 Mar, 2006]



Develop; an ‘appropriate’ Conceptual Data
Model for a Case Study organisation.
Develop; a ‘robust’ Logical Data Model
based on the Conceptual Data Model.
Assignment 2 (50%) [28 Apr, 2006]


Ian Perry
Implement; a ‘accurate’ Physical Data
Model based on the Logical Data Model.
Manipulate; the Physical Data Model to
‘prove it can’ Answer Specific Questions
from the Case Study.
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 17
This Week’s Workshop


In this Workshop we will begin to explore some of the
decisions we must make as we attempt to construct a
model of ‘real’ world ‘things’.
Working alone, or in a small team, consider the
following half dozen ‘things’ that exist in the ‘real’
world.


For each of the above;


list as many as you can imagine (try to be as creative &
inventive as you can) of the ways that it might be modelled.
For each way of modelling the above ‘things’;


University, Computer, Bank, Shoe Shop, Doctor’s Surgery,
Sports Activity.
indicate who might regard this form of model as a meaningful
and useful abstraction that captures its essential aspects.
DO NOT arrive at the workshop un-prepared!
Ian Perry
44220: Database Design & Implementation: Modelling the ‘Real’ World
Slide 18