R
Rob
Hi all,
I have a question about a table and relationship design. I am
building a Task management system for my current workplace (well an
upgrade of an older version). I think that I have the tables well
developed and they seem to be working well for the actual task
management. Each task is assigned to a position rather than a person
as we have a high turn over of staff. What I need to track is what
people have been assigned to a particular position.
The relationship between our staff and positions are a M:M I think as
a staff member can hold different positions at different times (or in
rare cases at the same time). This is how I currently have the
relationship setup:
tblStaff - info about the person (PK - staffID)
tblPosition - info about the position (PK - positionID)
tblStaffPositionJoin - contains staffID, positionID, StartDate and
EndDate
This seems to be working, however to satisfy business rules, before
assigning somebody to a new position I check whether the position is
filled and if the user confirms the change I set the end date and then
add the new staff member. The problem is that I have a feeling that I
am overcomplicating the struture here and it could be done better. Is
there an easier way of doing this (I am sure it is a common
functionality of personnel dbs) or is this OK?
Cheers
Rob
I have a question about a table and relationship design. I am
building a Task management system for my current workplace (well an
upgrade of an older version). I think that I have the tables well
developed and they seem to be working well for the actual task
management. Each task is assigned to a position rather than a person
as we have a high turn over of staff. What I need to track is what
people have been assigned to a particular position.
The relationship between our staff and positions are a M:M I think as
a staff member can hold different positions at different times (or in
rare cases at the same time). This is how I currently have the
relationship setup:
tblStaff - info about the person (PK - staffID)
tblPosition - info about the position (PK - positionID)
tblStaffPositionJoin - contains staffID, positionID, StartDate and
EndDate
This seems to be working, however to satisfy business rules, before
assigning somebody to a new position I check whether the position is
filled and if the user confirms the change I set the end date and then
add the new staff member. The problem is that I have a feeling that I
am overcomplicating the struture here and it could be done better. Is
there an easier way of doing this (I am sure it is a common
functionality of personnel dbs) or is this OK?
Cheers
Rob