DBApprentice
On Error GoTo AWF *****:
- Local time
- Today, 01:29
- Joined
- Dec 24, 2018
- Messages
- 150
Hi guys!
I am working a pet project from my job, this DB is intended to manage employees, competence and trainings certificates, installations and the dynamics of crew changes and compliance of paperwork. I have posted this question in Stack Overflow 5 days ago but I had few inputs there, so I will take my chances wih you guys.
During the desiging of the ER Diagram I cam e to a problem: each crew member can act in roles (Maintenance Supervisor, Mechanics, Lead Mechanics, Electricians, Automation Leader, etc.).
Because crew follows a hierarchy, I am interested in build a model where I can save which roles a person can act, for instance: Lead Mechanic can cover absence of a Mechanic, Automation Leader can cover Automation Techs and so on. Each installation has its own training matrix, so it also impact the roles and employees. One cannot assume Maintenance Supervisor can cover Mechanic position because this person acting as maintenance supervisor came from Automation area and may not act with other disciplines (Electrical, Mechanical, Electronics).
But my business rule is basically this: 1. An Employee needs a Diploma to be hired and act in a Role 2. Every Installation has its own Training Matrix 3. A Role needs to attend to Training Matrix of the assigned Installation. 4. An employee can act on different Roles only if he has Diploma and attended the trainings necessary based on the installation´s matrix.
Practical example: John Rambo has been hired as Maintenance Supervisor, he has a Mechanical diploma. this means he can act as Lead Mechanic and Mechanic if necessary. John is assigned to work in Installation B and take all trainings necessary to be compliant. One day, Installation C Mechanic, Sheldon Cooper, calls in sick and John Rambo is the only option we have, but we need to run a gap analysis on his trainings matrix to make sure he has all trainings mandatory and see which ones he will have to take to be sent there. The gap analysis detects a 1h course on stainless steel bolts is missing but he can take it online to close it. Then we can enroll him on this training before sending Maintenance Supervisor John Rambo to installation C to work as a Mechanic and cover Mechanic Sheldon Cooper in Installation C. Does that make sense to the ER Diagram I came up with? Thanks for your time!
As a complement, the certificate issued after a course is finished belong to the Employee, so he can fulfill requirements to act in a Role. It means that the relationship between Employee/Certificate and there is another relationship between Role/Employee and another one Installation/Role.
This is a preview of the ER Diagram, but something that I might have done wrong is about the entities Role and Trainings. Sadly I cannot explain how and why.
Appreciate any help!
I am working a pet project from my job, this DB is intended to manage employees, competence and trainings certificates, installations and the dynamics of crew changes and compliance of paperwork. I have posted this question in Stack Overflow 5 days ago but I had few inputs there, so I will take my chances wih you guys.
During the desiging of the ER Diagram I cam e to a problem: each crew member can act in roles (Maintenance Supervisor, Mechanics, Lead Mechanics, Electricians, Automation Leader, etc.).
Because crew follows a hierarchy, I am interested in build a model where I can save which roles a person can act, for instance: Lead Mechanic can cover absence of a Mechanic, Automation Leader can cover Automation Techs and so on. Each installation has its own training matrix, so it also impact the roles and employees. One cannot assume Maintenance Supervisor can cover Mechanic position because this person acting as maintenance supervisor came from Automation area and may not act with other disciplines (Electrical, Mechanical, Electronics).
But my business rule is basically this: 1. An Employee needs a Diploma to be hired and act in a Role 2. Every Installation has its own Training Matrix 3. A Role needs to attend to Training Matrix of the assigned Installation. 4. An employee can act on different Roles only if he has Diploma and attended the trainings necessary based on the installation´s matrix.
Practical example: John Rambo has been hired as Maintenance Supervisor, he has a Mechanical diploma. this means he can act as Lead Mechanic and Mechanic if necessary. John is assigned to work in Installation B and take all trainings necessary to be compliant. One day, Installation C Mechanic, Sheldon Cooper, calls in sick and John Rambo is the only option we have, but we need to run a gap analysis on his trainings matrix to make sure he has all trainings mandatory and see which ones he will have to take to be sent there. The gap analysis detects a 1h course on stainless steel bolts is missing but he can take it online to close it. Then we can enroll him on this training before sending Maintenance Supervisor John Rambo to installation C to work as a Mechanic and cover Mechanic Sheldon Cooper in Installation C. Does that make sense to the ER Diagram I came up with? Thanks for your time!
As a complement, the certificate issued after a course is finished belong to the Employee, so he can fulfill requirements to act in a Role. It means that the relationship between Employee/Certificate and there is another relationship between Role/Employee and another one Installation/Role.
This is a preview of the ER Diagram, but something that I might have done wrong is about the entities Role and Trainings. Sadly I cannot explain how and why.
Appreciate any help!