Hi all,
I am just after some advice as the first time in history I am doing an ERD and get stuck at a point. If somebody has a solution to it, please step forward :)
The application I am planning:
System to track Employees and their skillset. And the main problem is: There are two ways an Employee can acquire a skill:
1. By completing a training course
2. By "just having it" (enter the skill manually)
So the training courses are linked ot a skill ("If you complete this course you acquire skill XYZ"). An employee has a skill at a certain level (Low, Medium, High). If he acquires a skill through a course (e.g.: "MCDBA Bootcamp + Exam" course gives him the "MSSQL2000" skill at level 3-high), that skill "degrades" after a while. So after 6 months, that skill will be at Medium, after a year at Low if he does not do further training.
Well, I think I know how to do the thing with skills and degrading them. But what I am struggling with is the fact that there are two ways an employee can acquire a skill. The skills he got through a course can easily be found out by joining the employees, courses and skills tables (with some n:m: table inbetween, obviously). But how do I get the skills which are manually entered for this guy?
The only thing I though of was creating a trigger or Stored Procedure on some tables and then manually put all skills into a temporary (well no, rather fixed actually) table. So as soon as the course for an employee is marked as "completed", the Trigger kicks in and adds the skill which is associated to this course into another table. And we can then manually add stuff do this other table.
But I dont actually like this. Rather like this to be solved within the design, not with code.
Any hints?
I have created the Schema in fabForce DBDesigner 4. You can get the SQL code (best used with MySQL) here:
http://temp.mylansite.org/EmployeeSkills.sql
The XML for DBDesigner (if anybody wants to play around with it and send it back to me):
http://temp.mylansite.org/EmployeeSkills.xml
And a Screenshot of the ERD so far:
http://temp.mylansite.org/EmployeeSkills.jpg
Any help greatly appreciated!
Cheers
Samuel