Professional Documents
Culture Documents
Entity-Relationship Modeling
Entity-Relationship Modeling
ENTITY-RELATIONSHIP MODEL
Based on the perception of real world that
consists of a collection of basic objects,
called entities and of relationship among
entity sets.
used to visually represents data objects.
Rmmacarang_dbms1_lecture
ENTITY TYPES
A group of objects with the same properties,
which are identified by the enterprise as
having an independent existence.
ENTITY OCCURRENCE
Uniquely identifiable object of an entity type.
Rmmacarang_dbms1_lecture
RELATIONSHIP TYPES
A set of meaningful associations among
entity types.
Associations between one or more
participating entity types.
Each relationship types is given a name that
describes its function.
Rmmacarang_dbms1_lecture
RELATIONSHIP OCCURRENCE
Uniquely identifiable association, which
includes one occurrence from each
participating entity type.
Relationship
Name
Rmmacarang_dbms1_lecture
DEGREE OF RELATIONSHIP TYPE
A relationship of degree two is called
binary.
A relationship of degree three is called
ternary.
has Branch
Staff
Staff register a
client at a branch.
Rmmacarang_dbms1_lecture
Client
DEGREE OF RELATIONSHIP TYPE
A relationship of degree four is called
quaternary. A solicitor arranges
a bid on behalf of a
buyer supported by
Solicitor a financial
institution.
arrange
Financial
Buyer
institution
Rmmacarang_dbms1_lecture
Bid
RECURSIVE RELATIONSHIP
A relationship type when the same entity type
participates more then once in different roles.
this types of relationship are sometimes
called unary relationship.
Relationship may be given role names to
indicate the purpose that each participating
entity type plays in a relationship.
Rmmacarang_dbms1_lecture
RECURSIVE RELATIONSHIP
Role Name
Supervise
Supervisor
Supervises Staff
Role Name
Rmmacarang_dbms1_lecture
RECURSIVE RELATIONSHIP
Entities associated
Role Name through two distinct
relationship
Role Name
Rmmacarang_dbms1_lecture
ATTRIBUTES
A property of an entity or a relationship type.
For example: a STAFF entity may be describe
by the StaffNo, name, position and salary.
ATTRIBUTE DOMAIN
The set of allowable values for one or more
attributes. Attributes may share a domain.
For example: address attributes of branch,
private owner and business owner entity share
the same domain of all the possible addresses.
Rmmacarang_dbms1_lecture
SIMPLE ATTRIBUTE
An attribute composed of a single component
with an independent existence.
Ex. Staff entity has a simple attribute of Position
and salary.
COMPOSITE ATTRIBUTE
An attribute composed of multiple components,
each with an independent existence.
Ex. address attribute can be subdivided into
street, city and postcode.
Rmmacarang_dbms1_lecture
SINGLE-VALUED ATTRIBUTE
An attribute that holds a single value for each
occurrence of an entity type.
MULTI-VALUED ATTRIBUTE
An attribute that holds multiple values for
each occurrence of an entity type.
Ex. branch entity type can have multiple
values for the telNo.
Rmmacarang_dbms1_lecture
STRONG ENTITY TYPE
An entity type that is not existence
dependent on some other entity type.
Rmmacarang_dbms1_lecture
STRONG AND WEAK ENTITY
Strong Weak
entity entity
CLIENT
clientNo. states PREFERENCES
Name prefType
fname maxRent
lname
telNo.
Rmmacarang_dbms1_lecture
PROBLEMS WITH ER MODEL
FAN TRAPS – Where a model represents a
relationship between entity types but the
pathway between certain entity occurrences
is ambiguous.
operates
has
Staff division Branch
Rmmacarang_dbms1_lecture
PROBLEMS WITH ER MODEL
CHASM TRAPS – Where a model suggests
the existence of a relationship between entity
types, but the pathway does not exist
between certain entity occurrences.
oversees
has Property for
Branch Staff rent
Rmmacarang_dbms1_lecture