Consider the case of an organization having many departments. Each department has a department
head known as senior manager. Several employees are working in a department under the senior
manager. Identify the most appropriate ER-diagram that represents the relationship between
department and employees.
A.
Option A
B.
Option B
C.
Option C
D.
Option D
Explanation:
The relationship between department and employees is one-to-many and that of employees and
department is one-to-one, i.e. an employee
can work in only one department at a time.
In the figure, a single line across the right end of the relationship represents one-to-one cardinality.
The crowfoot at the left end of the relationship signifies an optional cardinality of any number of, or
several.
Answer C is incorrect. A single line across the left end of the relationship represents one-to-one
cardinality. The crowfoot at the right
end of the relationship signifies an optional cardinality of any number of, or several. According to
this figure, an employee can work in several
departments and a department has a single employee, which is not possible.
Answer B is incorrect. A single line between the two entities means one-to-one cardinality.
Answer A is incorrect. A single line across the left end of the relationship represents one-to-one
cardinality. However, in this case, a
department can have several employees, not just one.