1

How do I design a database so that when a lower employee (associate) requests a leave that needs to be approved by their superiors the request will find its way up to them?

  • Any employee can request a leave.
  • The approval of the request is limited to upper positions (superiors).
  • Different departments have different depths in the position hierarchy.
  • Every supervisor that is directly above the employee must approve the request. For example, a leave request of an associate that is under the Maintenance section of the Admin department must be approved by the Maintenance supervisor and the Admin Manager.

My database design:

ERD

3
  • leave_approvals must contain a column with id of the person who should approve / have approved (and, maybe, approvement date).
    – Akina
    May 16, 2023 at 5:35
  • Thanks for the answer but I am also confused on what the best way to implement a multi level approval as the leave request of the lower employee(associate) must be approve by its 3 superior May 16, 2023 at 9:23
  • 1
    This is administrative problem which is out of the DB structure. You'd analyse and create this process algorithm, after which you may implement it.
    – Akina
    May 16, 2023 at 10:54

1 Answer 1

0

I don't see the problem here.

the architecture of the database is OK for me.

when a lower employee (associate) requests a leave that needs to be approved by their superiors

This is a layer of abstraction that has nothing to do with the database architecture. You will put that rule in the code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.