Erd Model

Only available on StudyMode
  • Download(s) : 23
  • Published : February 10, 2013
Open Document
Text Preview

What is it about?

• ER model is used to show the Conceptual schema of an organisation.

• Independent of specific data model or DBMS

• The model is later transformed into a Logical model (e.g. relational) on which the physical database is built

• The most widely used form of Semantic modelling: attempt to capitalise on knowledge of meaning of data to inform the model

Perspective of the Entity Relationship Model


Concepts of the ER Model

– The basics of Entity-Relationship modelling

– Entities

– Relationships

– Attributes

Entity Type

• Entity - distinguishable “thing” in the real world

– Strong (or regular) entity - entities have an independent existence (e.g. staff)

– Weak entity - existence dependent on some other entity (e.g. next of kin)

ER diagram of Staff and Branch entity types



• Entity types have Attributes (or properties) which associate each entity with a value from a domain of values for that attribute

• Attributes can be

o simple (atomic)e.g. Surname; date of birth
▪ Attribute composed of a single component with an independent existence

o compositee.g. address (street, town, postcode)
▪ Attribute composed of multiple components, each with an independent existence. o single-valued
▪ Attribute that holds a single value for each occurrence of an entity type.

o multi-valuede.g. phone number
▪ Attribute that holds multiple values for each occurrence of an entity type.

o derivede.g. D.O.B. ; age
▪ Attribute that represents a value that is derivable from value of a related attribute, or set of attributes, not necessarily in the same entity type.

o Relationship types can also have attributes! (see later)


• A relationship is
“... An association among entities (the participants)...”

• Relationships link entities with each other


Name: verb, capital start letter, arrow indicates
direction in which verb makes sense

← Relationship type

← Set of meaningful associations among entity types.

← Relationship occurrence

← Uniquely identifiable association, which includes one occurrence from each participating entity type.

Semantic net of Has relationship type


ER diagram of Branch Has Staff relationship


Relationship Types

← Degree of a Relationship

← Number of participating entities in relationship.

← Relationship of degree :

← two is binary

← three is ternary

← four is quaternary.

Binary relationship


Ternary relationship


Quaternary relationship


Relationship Types

← Recursive Relationship

← Relationship type where same entity type participates more than once in different roles.

← Relationships may be given role names to indicate purpose that each participating entity type plays in a relationship.

Recursive relationship called Supervises with role names


Entities associated through two distinct relationships with role names



← Candidate Key

← Minimal set of attributes that uniquely identifies each occurrence of an entity type. ← Primary Key
← Candidate key selected to uniquely identify each occurrence of an entity type. ← Composite Key
← A candidate key that consists of two or more attributes. ER diagram of Staff and Branch entities and their attributes


Entity Type

← Strong Entity Type
← Entity type that is not existence-dependent on some other entity type. ← Weak Entity Type...
tracking img