Lab04 Sol
Lab04 Sol
Tutorial 4
1. A car (an entity) could have several different colors (a multivalued attribute)
on different parts of the car
2. A student (an entity) may have several mobile phone numbers (a multi
valued attribute).
Q2. Referring to Q1, explain briefly TWO solutions on how a multivalued attribute is
implemented in a relational database.
1. Within the original multivalued attribute (e.g., color attribute), split it to new
attributes (e.g., topcolor, bodycolor, interiorcolor, etc.)
1
Q3. Draw a complete E-R Diagram based on the following business rules:
a) Identify all possible entities. Hint: An entity is normally a noun that can be found
in the business rule.
Company
Department
Employee
Dependent (please explain what a dependent is, students may not know)
Room
Day
b) Let’s examine each of the entities that are listed out. Is it necessary to include
every entity that can be found in the business rules? Explain your answer.
Although the ERD (conceptual model) represents the global view of the
organization, not everything needs to be implemented in the physical model (the
way data are stored in memory/disk). E.g., the ‘room’ is a possible entity derived
2
from the business rules, but from a representation point of view, we do not need to
keep track on how the room is used.
c) Let’s examine the relationships between the entities. List out possible relationship
between every two entities you listed out in question 2(b), specify whether it is a
mandatory or optional relationship, and specify the cardinality (whether 1:1, 1:M,
M:N etc).
d) Complete the ERD using the elements you identified in steps Q3 (a) to (c).
DEPARTMENT
1 (1,30)
employs
M (1,1) M N
EMPLOYEE uses COMPUTER
(0, N) (0, N)
(0, N)
has
M (1,1)
DEPENDENTS
3
** Note to tutor: If time permits, can expose student to select records from table such as.
Connect to dbStudent