Lecture 3 - Entity Relationship Model
Lecture 3 - Entity Relationship Model
Lecture 3 - Entity Relationship Model
ENTITY-RELATIONSHIP MODELING
Muhammad Hamiz Mohd Radzi
Faiqah Hafidzah Halim
Content
■ Entity Types
■ Relationship Types
■ Attributes
■ Strong and Weak Entities
■ Attributes on Relationship
■ Structural Constraints
■ Enhanced ER Modeling
■ Specialization/Generalization
Objectives
■ At the end of this lesson, you should be able to:
• ERM is existed as to explore the different ways that entities can relate to
each other as they always do in the real world.
• The things that you need to know in order to construct the ERM are:
• Entity
• Attribute
Entity
• Entity set - A collection of entities of the same type (e.g., all of the
company’s employees).
• Entity type - A group of objects with the same properties, which are
identified by the enterprise as having an independent existence.
• For example:
Diagrammatic View
Degree of Relationship
■ Relationship of degree :
– two is binary
– three is ternary
– four is quaternary.
Recursive Relationship
• Each attributes have its own domain of values, for example, Room Number
must be an Integer range from 1000-1999
• Simple attribute - An attribute composed of a single component with
an independent existence.
• It cannot be further subdivided into smaller components. For example
Salary.
■ Multiplicity - number (or range) of possible occurrences of an entity type that may
relate to a single occurrence of an associated entity type through a particular
relationship.
– one-to-one (1:1)
– one-to-many (1:*)
– many-to-many (*:*)
Semantic net of Staff Manages
Branch relationship type
Multiplicity of Staff Manages Branch
(1:1) relationship
Semantic net of Staff Oversees
PropertyForRent relationship type
Multiplicity of Staff Oversees
PropertyForRent (1:*) relationship type
Semantic net of Newspaper Advertises
PropertyForRent relationship type
Multiplicity of Newspaper Advertises
PropertyForRent (*:*) relationship
Structural Constraints
■ Problems may arise when designing a conceptual data model called connection
traps.
■ Fan Traps: Where a model represents a relationship between entity types, but
pathway between certain entity occurrences is ambiguous.
■ Semantic concepts are incorporated into the original ER model and called
the Enhanced Entity-Relationship (EER) model.