You are on page 1of 7

Week4

Entity Relationship Modelling

How would you graphically identify each of the following ERM components in a Crow’s
Foot notation ith example?

 An entity

 The cardinality (0, N)

 A weak relationship

 A Strong Relationship

They will be graphically identified as:

An entity

It is a representation of a class of object.

The cardinality (0, N)

It represents zero or many relationships.


A weak relationship

1. A weak relationship exists when the PK of the related entity does not
2. contain at least one of the PK attributes of the parent entity
3. A weak relationship exists when the PK of the related entity does not
4. contain at least one of the PK attributes of the parent entitA weak relationship exists when
the PK of the related entity does not contain at least one of the PK attributes of the parent
entity
5. A weak relationship exists when the PK of the related entity does not
6. contain at least one of the PK attributes of the parent entity

A weak relationship exists when there is no primary key in the entity. It is represented
as a dotted line

A Strong Relationship

It is represented as a straight line.


Discuss the difference between a composite key and a composite attribute. How would each
be indicated in an ERD?

Composite Attribute:

A composite attribute is an attribute that can be divided into smaller sub-parts, each representing
a simpler attribute with its own meaning.
It helps in organizing complex data structures into more manageable units.
For example, a student name is Adam Smith which can be broken into first name and last name
so it is a composite attribute.

Composite Key:
A composite key is a combination of two or more attributes that uniquely identifies an entity
within an entity set. It's often used when a single attribute cannot uniquely identify an entity on
its own. Each attribute within the composite key contributes to the uniqueness of the entity.
For example, in a table a composite key can be a combination of student id and course id to
uniquely identify each enrollment.
The local city youth league needs a database system to help track children that sign up to
play soccer. Data needs to be kept on each team and the children that will be playing on
each team and their parents. Also, data needs to be kept on the coaches for each team.
Draw the data model described below.

Entities required: Team, Player, Coach, and Parent.

Attributes required:

Team: Team ID number, Team name, and Team colors.

Player: Player ID number, Player first name, Player last name, and Player age.

Coach: Coach ID number, Coach first name, Coach last name, and Coach home phone
number.

Parent: Parent ID number, Parent last name, Parent first name, Home phone number, and
Home Address (Street, City, State, and ZIP Code).
The following relationships must be defined:

 Team is related to Player.


 Team is related to Coach.
 Player is related to Parent.

Connectivities and participations are defined as follows:

 A Team may or may not have a Player.


 A Player must have a Team.
 A Team may have many Players.
 A Player has only one Team.
 A Team may or may not have a Coach.
 A Coach must have a Team.
 A Team may have many Coaches.
 A Coach has only one Team.
 A Player must have a Parent.

 A Parent must have a Player.

 A Player may have many Parents.

 A Parent may have many Players.


What is Derived attribute? Explain with example.

Derived attribute is those attribute whose value is derived from other attributes. For example, if
we know the date of birth of the student then we can derive the age of the student from it so age
is the derived attribute here. It is represented by dotted circle.

Write the business rules reflected in the conceptual model shown in Fig 1.

The following business rules are reflected in the ERD:


 A store may place many orders.
 An order must be placed by a store
 An order contains at least one order line.
 Each order line is contained in one and only one order.
 Each order line has a specific product written in it.
 A product may be written in many orders.
 A store may employ many employees.
 Each employee is employed by one (and only one) store.
 An employee may have one or more dependents.
 A dependent must be related to an employee.

You might also like