How to records the number of hours each month an employee worked in an ER diagram between two entities?

411 Views Asked by At

So we have two entities, employee, and group

  1. An employee is uniquely identified by an id and has a name
  2. A group is uniquely identified by name and has a department
  3. An employee may work in multiple groups, and each group contains many employees
  4. You should also record the number of hours an employee worked each month for a particular group. Note that the employees do not work the same number of hours each month.

enter image description here

I was able to make an ER diagram for 1 to 3, but I am having trouble with the number 4. How can I represent the fourth requirement in my ER diagram?

1

There are 1 best solutions below

0
Iordanis L. On

Note that more than 2 entities can be part of a relationship. In your problem the solution would be something like this:

3-way-relationship

You should also consider setting the participation of each entity to the relationship via the lines (zero to one, one to many and so on).