David Garcia
David Garcia

Reputation: 2696

Entity relationship modelling, comment on my ERD

Note: Due to low reputation I can't post images so i have added the links accordingly.

I have this assignment I'm working and I am stuck in a recursive relationship, following is part of the case scenario that I am currently modelling;

Now, from the first Three paragraphs i have deducted the following business rules;

  1. Employee is allocated ONE branch and a branch employs ONE or MANY employees
  2. Each branch is designated ONE manager and ONE assistant manager
  3. Employee is managed by ONE manager and supervised by ONE assistant manager
  4. Employee submits ZERO, ONE or MANY previous employment records, a instance of a record is associated to ONE employee only
  5. Employee is assigned ONE job position only, a job position can be assigned to ONE or MANY employees

(note: I have assumed in rule n.2 that a branch is also designated an assistant manager)

And now this is the ERD diagram for the above rules;

So from the scenario, the assistant manager only supervises the staff, but it does not say that it has any relationship with the branch entity, however i assumed that a branch should have a relationship with the the manager and the assistant manager, but i am a bit confused so i havent added it yet to the erd diagram. Can you guys help me out?

Upvotes: 2

Views: 2362

Answers (1)

Martin Spamer
Martin Spamer

Reputation: 5585

Firstly it appears you seem to be drawing a UML Domain model not a ER diagram. These are not the same thing. You've identified an employee but seem to be trying to use it polymophically for all things. This premature optimisation (and for re-use), when you should be following the rules of normalisation of entity relationships. Take a step back, create tables for manager, assistent manager and employee. Add the fields to those, THEN try to normalise.

Upvotes: 2

Related Questions