Professional Documents
Culture Documents
MIS 403 - Database Management Systems - II: DR Mohamed A Sheriff
MIS 403 - Database Management Systems - II: DR Mohamed A Sheriff
Dr Mohamed A Sheriff
2
Chapter 12 - Objectives
4
Pearson Education © 2009
Structural Constraints
Cardinality
– Describes maximum number of possible
relationship occurrences for an entity
participating in a given relationship type.
Participation
– Determines whether all or only some entity
occurrences participate in a relationship.
5
Pearson Education © 2009
Multiplicity as cardinality and participation
constraints
6
Pearson Education © 2009
Problems with ER Models
Problems may arise when designing a
conceptual data model called connection traps.
Often due to a misinterpretation of the
meaning of certain relationships.
Two main types of connection traps are called
fan traps and chasm traps.
7
Pearson Education © 2009
Problems with ER Models
Fan Trap
– Where a model represents a relationship
between entity types, but pathway between
certain entity occurrences is ambiguous.
Chasm Trap
– Where a model suggests the existence of a
relationship between entity types, but pathway
does not exist between certain entity
occurrences.
8
Pearson Education © 2009
An Example of a Fan Trap
9
Pearson Education © 2009
Semantic Net of ER Model with Fan Trap
10
Pearson Education © 2009
Restructuring ER model to remove Fan Trap
11
Pearson Education © 2009
Semantic Net of Restructured ER Model
with Fan Trap Removed
12
Pearson Education © 2009
An Example of a Chasm Trap
13
Pearson Education © 2009
Semantic Net of ER Model with Chasm Trap
14
Pearson Education © 2009
ER Model restructured to remove Chasm Trap
15
Pearson Education © 2009
Semantic Net of Restructured ER Model
with Chasm Trap Removed
16
Pearson Education © 2009
Class Exercise - Entity Relationship Modelling
A university library keeps information on books held, students who borrow the books,
and the (book)loans which the students take. In addition, information is held about
the authors and the library cards the students use to borrow the books. A book can be
written by many authors and one author can write several books. Also a book(copy)
can be borrowed by many students and a student can borrow many books.
Each student is given one library card with a unique number. The card number and
date
of allocation of each card are recorded. A database designer has identified the following
entities and attributes for the library system.
Develop an ER diagram for the proposed library database system clearly indicating the
ER Diagram – Library Database using UML notation
Identify all primary (PK) and Foreign(FK) keys and decomposed any many-to-many
relationships