Pal gov.tutorial1.session1 1.informationmodeling

24
1 PalGov © 2011 فلسطينيةلكترونية الديمية الحكومة ا أكاThe Palestinian eGovernment Academy www.egovacademy.ps Tutorial 1: Data Process and Data Modeling Session 1.1 Information Modeling Prof. Mustafa Jarrar Sina Institute, University of Birzeit [email protected] www.jarrar.info Reviewed by Prof. Marco Ronchetti, Trento University, Italy

description

 

Transcript of Pal gov.tutorial1.session1 1.informationmodeling

Page 1: Pal gov.tutorial1.session1 1.informationmodeling

1PalGov © 2011

أكاديمية الحكومة اإللكترونية الفلسطينية

The Palestinian eGovernment Academy

www.egovacademy.ps

Tutorial 1: Data Process and Data Modeling

Session 1.1

Information Modeling

Prof. Mustafa Jarrar

Sina Institute, University of Birzeit

[email protected]

www.jarrar.info

Reviewed by

Prof. Marco Ronchetti, Trento University, Italy

Page 2: Pal gov.tutorial1.session1 1.informationmodeling

2PalGov © 2011

About

This tutorial is part of the PalGov project, funded by the TEMPUS IV program of the

Commission of the European Communities, grant agreement 511159-TEMPUS-1-

2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.ps

University of Trento, Italy

University of Namur, Belgium

Vrije Universiteit Brussel, Belgium

TrueTrust, UK

Birzeit University, Palestine

(Coordinator )

Palestine Polytechnic University, Palestine

Palestine Technical University, PalestineUniversité de Savoie, France

Ministry of Local Government, Palestine

Ministry of Telecom and IT, Palestine

Ministry of Interior, Palestine

Project Consortium:

Coordinator:

Dr. Mustafa Jarrar

Birzeit University, P.O.Box 14- Birzeit, Palestine

Telfax:+972 2 2982935 [email protected]

Page 3: Pal gov.tutorial1.session1 1.informationmodeling

3PalGov © 2011

© Copyright Notes

this material, or part of it, but should properly useEveryone is encouraged to

(logo and website), and the author of that part. cite the project

in any form or by any reproduced or modified No part of this tutorial may be

from the project, who have the full written permissionmeans, without prior

copyrights on the material.

Attribution-NonCommercial-ShareAlike

CC-BY-NC-SA

This license lets others remix, tweak, and build upon your work non-

commercially, as long as they credit you and license their new creations

under the identical terms.

Page 4: Pal gov.tutorial1.session1 1.informationmodeling

4PalGov © 2011

Tutorial Map

Topic Time

Module I: Conceptual Data Modeling

Session 0: Outline and Introduction

Session 1.1: Information Modeling 1

Session 1.2: Conceptual Data Modeling using ORM 1

Session 1.3: Conceptual Analyses 1

Session 2: Lab- Conceptual Analyses 3

Session 3.1: Uniqueness Rules 1.5

Session 3.2: Mandatory Rules 1.5

Session 4: Lab- Uniqueness & Mandatory Rules 3

Session 5: Subtypes and Other Rules 3

Session 6: Lab- Subtypes and Other Rules 3

Session 7.1: Schema Equivalence &Optimization 1.5

Session 7.2: Rules Check &Schema Engineering 1.5

Session 8: Lab- National Student Registry 3

Module II: Business Process Modeling

Session 9: BP Management and BPMN: An Overview 3

Session 10: Lab - BP Management 3

Session 11: BPMN Fundamentals 3

Session 12: Lab - BPMN Fundamentals 3

Session 13: Modeling with BPMN 3

Session 14: Lab- Modeling with BPMN 3

Session 15: BP Management & Reengineering 3

Session 16: Lab- BP Management & Reengineering 3

Intended Learning ObjectivesModule 1 (Conceptual Date Modeling)

A: Knowledge and Understanding

11a1: Demonstrate knowledge of conceptual modeling notations and concepts

11a2: Demonstrate knowledge of Object Role Modeling (ORM) methodology.

11a3: Explain and demonstrate the concepts of data integrity & business rules

B: Intellectual Skills

11b1: Analyze application and domain requirements at the conceptual level,

and formalize it using ORM.

11b2: Analyze entity identity at the application and domain levels.

11b4: Optimize, transform, and (re)engineer conceptual models.

11b5: Detect &resolve contradictions & implications at the conceptual level.

C: Professional and Practical Skills

11c1: Using ORM modeling tools (Conceptual Modeling Tools).

Module 2 (Business Process Modeling)

A: Knowledge and Understanding

12a1: Demonstrate knowledge of business process modeling notations and concepts.

12a2: Demonstrate knowledge of business process modeling and mapping.12a3: Demonstrate understand of business process optimization and re-engineering.

B: Intellectual Skills

12b1: Identify business processes.

12b2: Model and map business processes.

12b3: Optimize and re-engineer business processes.

C: Professional and Practical Skills

12c1: Using business process modeling tools, such as MS Visio.

Page 5: Pal gov.tutorial1.session1 1.informationmodeling

5PalGov © 2011

Session ILOs

After completing this session students will be able to:

11a1: Demonstrate knowledge of conceptual modeling notations

and concepts.

11b1: Analyze application and domain requirements at the

conceptual level, and formalize it using ORM.

Page 6: Pal gov.tutorial1.session1 1.informationmodeling

6PalGov © 2011

Information Modeling - The need for good design

Do you like the design of this table?

• This table is an output report. It provides one way to view the data.

• Different movies may have the same title.

• Movie numbers are used to provide a simple identifier.

• Each cell (row--column slot) may contain many values.

How can we design tables to store such facts?

MovieName ReleaseYear Director Stars

Awakenings 1991 Penny MarshallRobert De Niro

Robin Williams

Backdraft 1991 Ron Howard

William Baldwin

Robert De Niro

Kurt Russell

Cosmology 1994 Terry Harding

Dances with wolves 1990 Kevin CostnerKevin Costner

Mary McDonnell

Page 7: Pal gov.tutorial1.session1 1.informationmodeling

7PalGov © 2011

MovieName ReleaseYear Director Star

Awakenings 1991 Penny Marshall Robert De Niro

Awakenings 1991 Penny Marshall Robin Williams

Backdraft 1991 Ron Howard William Baldwin

Backdraft 1991 Ron Howard Robert De Niro

Backdraft 1991 Ron Howard Kurt Russell

Cosmology 1994 Terry Harding

Dances with wolves 1990 Kevin Costner Kevin Costner

Dances with wolves 1990 Kevin Costner Mary McDonnell

MovieA badly-designed table, why?

Information Modeling - The need for good design

Page 8: Pal gov.tutorial1.session1 1.informationmodeling

8PalGov © 2011

Information Modeling - The need for good design

MovieName ReleaseYear Director

Awakenings 1991 Penny Marshall

Backdraft 1991 Ron Howard

Cosmology 1994 Terry Harding

Dances with wolves 1990 Kevin Costner

Movie

MovieName Star

Awakenings Robert De Niro

Awakenings Robin Williams

Backdraft William Baldwin

Backdraft Robert De Niro

Backdraft Kurt Russell

Cosmology

Dances with wolves Kevin Costner

Dances with wolves Mary McDonnell

Movie Stars

Do you like the design of this table?

Page 9: Pal gov.tutorial1.session1 1.informationmodeling

9PalGov © 2011

Information Modeling - The need for good design

MovieName ReleaseYear Director

Awakenings 1991 Penny Marshall

Backdraft 1991 Ron Howard

Cosmology 1994 Terry Harding

Dances with wolves 1990 Kevin Costner

Movie

MovieName Star

Awakenings Robert De Niro

Awakenings Robin Williams

Backdraft William Baldwin

Backdraft Robert De Niro

Backdraft Kurt Russell

Cosmology

Dances with wolves Kevin Costner

Dances with wolves Mary McDonnell

Movie Stars

Do you like the design of this table?

A relational database representation

Page 10: Pal gov.tutorial1.session1 1.informationmodeling

10PalGov © 2011

Information Modeling - The need for good design

MovieName ReleaseYear Director

Awakenings 1991 Penny Marshall

Backdraft 1991 Ron Howard

Cosmology 1994 Terry Harding

Dances with wolves 1990 Kevin Costner

Movie

MovieName Star

Awakenings Robert De Niro

Awakenings Robin Williams

Backdraft William Baldwin

Backdraft Robert De Niro

Backdraft Kurt Russell

Cosmology

Dances with wolves Kevin Costner

Dances with wolves Mary McDonnell

Movie Stars

Do you like the design of this table?

Information Modeling is both a science and an art.

When supported by a good modeling approach, this

design process is a stimulating and intellectually

satisfying activity, with tangible benefits gained from

the quality of the database applications produced.

Page 11: Pal gov.tutorial1.session1 1.informationmodeling

11PalGov © 2011

Information Modeling - The need for good design

• Why a good design is important?

– Consistency

– Efficiency

• What makes a good design good?

– Correct

– Complete

– Efficient

• What skills you should have to be a good information

modeler?

• What approaches exist to help you reach good models?

Page 12: Pal gov.tutorial1.session1 1.informationmodeling

12PalGov © 2011

Information Modeling - The need for good design

• The application area being modeled is called the universe of discourse

(UoD).

• Building a good model requires a good understanding of the world we

are modeling.

• The main challenge is to describe the UoD clearly and precisely.

• A person responsible for modeling the UoD is called a modeler.

• we should consult with others who, at least collectively, understand the

application domain—these people are called domain experts, subject matter experts, or UoD experts.

• For implementation, it is important to represent information at the

conceptual level -in concepts that people (molders and domain

experts) find easy to work with.

• This added flexibility also makes it easier to implement the same

conceptual model in different ways, DB schema, XML schema, etc.

Page 13: Pal gov.tutorial1.session1 1.informationmodeling

13PalGov © 2011

Modeling Approaches

Page 14: Pal gov.tutorial1.session1 1.informationmodeling

14PalGov © 2011

Modeling Approaches

The main information modeling approaches are:

• Entity-Relationship modeling (ER)

• Object-oriented modeling (UML)

• Fact-oriented modeling (ORM)

Page 15: Pal gov.tutorial1.session1 1.informationmodeling

15PalGov © 2011

Modeling Approaches

Given simple data for room scheduling:

ER-model

UML-model

ORM-model

Page 16: Pal gov.tutorial1.session1 1.informationmodeling

16PalGov © 2011

Entity-Relationship Modeling (ER)

• Introduced by Peter Chen in 1976, widely used approach for DB modeling.

• Pictures the world in terms of entities that have attributes and participate in

relationships.

• Many different versions of ER (no standard ER notation). Different versions of ER

may support different concepts and may use different symbols for the same concept.

• Relationships are depicted as named lines connecting entity types. Only binary

relationships are allowed, and each half of the relationship is shown either as a solid

line (mandatory) or broken line (optional). A fork or ―crow’s foot‖ at one end of a

relationship indicates that many instances of the entity type at that end may be

associated (via that relationship) with the same entity instance at the other end of

the relationship. The lack of a crow’s foot indicates that at most one entity instance

at that end is associated with any given entity instance at the other end.

Page 17: Pal gov.tutorial1.session1 1.informationmodeling

17PalGov © 2011

Object-Oriented Modeling (UML)

• UML class diagram are used to specify static data structures (OMG Standard).

• Encapsulates both data and behavior within objects.

• Pictures the world in terms of classes that have attributes and participate in

associations. Ternary associations are allowed, see the diagram.

• UML allow constraints in braces or notes in whatever language you wish.

• Form example, {P} can be added to denote primary uniqueness and {U1} for an

alternate uniqueness—these symbols are not standard and hence not portable. The

uniqueness constraints on the ternary are captured by the two 0..1 (at most one)

multiplicity constraints. The ―*‖ means ―0 or more‖. Attributes are mandatory by default.

Page 18: Pal gov.tutorial1.session1 1.informationmodeling

18PalGov © 2011

Fact-Oriented Modeling (ORM)

• Introduced by Sjir Nijssen early 1970s, was called NIAM.

• Revised by Terry Halpin (late 1980s), and called:

Object-Role Modeling (ORM)

• It views the world as object-types playing roles.

• Object-types are ellipses (no attributes), and relations consists of roles.

• Not only n-ary relations are supported, but ORM supports also more than 15 types

of constrains graphically.

• ORM allows verbalization of diagrams.

• More conceptual than UML and ER.

• ORM is a modeling approach, not only a modeling language.

Page 19: Pal gov.tutorial1.session1 1.informationmodeling

19PalGov © 2011

Information Levels

Page 20: Pal gov.tutorial1.session1 1.informationmodeling

20PalGov © 2011

Information Levels (Data Modeling Viewpoint)

Physical Level

RelationalDB

Tree modelXML

Object Oriented OO-DB Graph Model

RDF

• Abstract data structures

• Same conceptual schema

can be mapped into

several logical structures

• The physical storage and access

structures used in a system (indexes,

file clustering, etc.).

• Same Logical schema can be stored

in different ways

• What kind of facts/concepts we need,

and how they are related.

• Conceptual models are designed for

clear communication, especially

between modelers and domain experts.

Conceptual Level

Logical Level

Page 21: Pal gov.tutorial1.session1 1.informationmodeling

21PalGov © 2011

Information Levels (Data Modeling Viewpoint)

Conceptual Level

Logical Level

Physical Level

Ontological Level

RelationalDB

Tree modelXML

Object Oriented OO-DB Graph Model

RDF

…• Abstract data structures

• Same conceptual schema

can be mapped into

several logical structures

• The physical storage and access

structures used in a system (indexes,

file clustering, etc.).

• Same Logical schema can be stored

in different ways

Linguistic Level

• Concerned with the meaning, in the real world.

• Concerned with the terms used to lexicalize the meaning.

• Same meaning (/intentions) can be conceptualized in different ways.

• Same meaning can be lexicalized in deferent languages.

• What kind of facts/concepts we need,

and how they are related.

• Conceptual models are designed for

clear communication, especially

between modelers and domain experts.

Page 22: Pal gov.tutorial1.session1 1.informationmodeling

22PalGov © 2011

Knowledge Levels (from philosophy viewpoint)[Guarino]

Level Primitives Interpretation Main feature

Linguistic Linguistic

terms

Subjective Language

dependence

Conceptual Conceptual

relations

Subjective Conceptualization

Ontological Ontological

relations

Constrained Meaning

Epistemological Structuring

relations

Arbitrary Structure

Logical Predicates,

functions

Arbitrary Formalization

Will be discussed later

Page 23: Pal gov.tutorial1.session1 1.informationmodeling

23PalGov © 2011

Information Levels (Data Modeling Viewpoint)

Conceptual Level

Logical Level

Physical Level

Ontological Level

RelationalDB

Tree modelXML

Object Oriented OO-DB Graph Model

RDF

…• Abstract data structures

• Same conceptual schema

can be mapped into

several logical structures

• The physical storage and access

structures used in a system (indexes,

file clustering, etc.).

• Same Logical schema can be stored

in different ways

Linguistic Level

• Concerned with the meaning, in the real world.

• Concerned with the terms used to lexicalize the meaning.

• Same meaning (/intentions) can be conceptualized in different ways.

• Same meaning can be lexicalized in deferent languages.

• What kind of facts/concepts we need,

and how they are related.

• Conceptual models are designed for

clear communication, especially

between modelers and domain experts.

ORM is the most suitable language for conceptual modeling (not

only conceptual data modeling). That is, it allows modelers to think

more conceptually and be more independent from the logical level.

ORM is also being used as ontology modeling language, business

rules and requirements specification, XML-schema modeling, etc.

(not only DB modeling)

Page 24: Pal gov.tutorial1.session1 1.informationmodeling

24PalGov © 2011

References

Information Modeling and Relational Databases: From Conceptual Analysis to Logical Design, Terry Halpin (ISBN 1-55860-672-6) –Chapter 1.