I'm trying to draw an ER diagram describing the following:
-"Department" employs "Employees"
-Some "Employees" are "Special" and have more attributes
-Some of the "Employees" ("Special" and non special) are "Managers"
-"Managers" manage "Departments"
So, to convey this I have:
Department ------(employs)------- Employee-----<--------Special
| |
|-----------(manages)----------
From my understanding, I cannot have 2 relationships between 2 entities. How do I deal with this situation then?
There is no reason you can't have multiple relationships between the same two entities, your understanding is wrong in this respect.
Cardinality and ordinality are two other notations used in ER diagrams to further define relationships.
Relationships Between Entities Some relationships involve only one entity. For example, Employee reports to Employee: This type of relationship is called a recursive relationship. There can be a number of different relationships between the same two entities.
In ER diagram, relationship type is represented by a diamond and connecting the entities with lines. A set of relationships of same type is known as relationship set.
There is no reason you can't have multiple relationships between the same two entities, your understanding is wrong in this respect.
You have to be certain, of course, that the relationships capture different information and that you haven't, say, mistaken the two aspects of a single relationship as two different relationships. Your example seems to be a good candidate for having two relationships between the two entities.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With