Sie sind auf Seite 1von 8

ICT1104 DATABASE MANAGEMENT

Chapter 4: Drawing Entity Relationship Diagram (ERD) using


Chen model and Crow’s Foot model

Item Chen model Crow’s foot model


Entity

Weak entity – the existence of this entity is depends on


another entity

- In crow’s foot model, it use the same


symbol to represent weak or associative
Associative entity – an entity used in a many-to-many entity.
relationship (represent an extra table). Relationships for
the associative entity should be many
Attribute
The identifier is marked with an asterisk.

Attributes are linked to the entity with straight lines.

Composite
attributes

Key attribute
Primary key Multivalued
attribute

Derived
attribute
Relationship Strong relationship Weak relationship They represent in straight line.
Usually, each relationship has a name, expressed as a verb,
written on the relationship line.

Strong relationship

Weak relationship

Cardinality The degree of relationship (cardinality) is represented by characters In crow’s foot notation:
“1”, “N” or “M” usually placed at the ends of the relationships:
 A multiplicity of one and a mandatory
 one-to-one (1:1) relationship is represented by a straight line
perpendicular to the relationship line.
The employee can manage only one department, and each
 A multiplicity of many is represented by the three-
department can be managed by one employee only:
pronged ‘crow-foot’ symbol.
 An optional relationship is represented by an
empty circle. Which mean by zero engagement

 many-to-one (N:1)

Many employees may belong to one department, but one particular


employee can belong to one department only:
 many-to-many (M:N)
Finally, there are 4 possible edges to the relationship as:
One student may belong to more than one student organizations, and
one organization can admit more than one student. 1) Zero or many

2) One or many

3) One and only one

4) Zero or one
Relationship degrees make them readable as:

1) One-to-one

2) One-to-many

3) Many-to-many
Participation 1) Total participation
Constraints
- means that every entity in the set is involved in the
relationship, e.g., each student must be guided by a
professor (there are no students who are not guided by
any professor). In the Chen notation, this kind of relation
is depicted as a double line.

2) Partial participation

- means that not all entities in the set are involved in the
relationship, e.g., not every professor guides a student
(there are professors who don’t). In the Chen notation, a
partial participation is represented by a single line.

The relationship shown above means that each student, without


exception, must be guided by one chosen professor, and one –
but not every – professor can guide many students. So there is
no student that is not guided by a professor, and on the other
hand there can be professors who don't guide any students.
Example

partial key attribute (discriminator) – an


attribute that, when combined with the key
attribute of the owner entity, provides a unique
identification for the weak entity. We underline
the discriminator with a dashed line:
Exercise:
Based on the following question, draw an ERD based on
1) Chen model
2) Crow Foot’s model

Question:
Suppose you are given the following requirements for a simple database for the National Hockey League (NHL):
 the NHL has many teams,
 each team has a name, a city, a coach, a captain, and a set of players
 each player belongs to only one team
 each player has a name, a position (such as left wing or goalie), a skill level, and a set of injury records
 a team captain is also a player
 a game is played between two teams (referred to as host_team and guest_team) and has a date (such as May 11th, 1999) and a score (such
as 4 to 2).

Das könnte Ihnen auch gefallen