Hi,
I'm building a sub-system that will auto generate
staff rosters, so far I've got the following tables:
Staff (sid, Name, etc...)
Roster(rid,startdate,enddate)
Date(dateid,date)
StaffDay(sid,rid,dateid,starttime,endtime,duty)
sid,rid,dateid in the StaffDay table will be enforced
as a composite unique key.
Each staff member can have a different start/end times
on any given day and be working any day in any week.
I don't like using the composite key(just doesn't feel
right) or that I'll be uniquely identifying dates, seeing
as how a date is already unique but I'm at a loss of how else to do it.
I'm building a sub-system that will auto generate
staff rosters, so far I've got the following tables:
Staff (sid, Name, etc...)
Roster(rid,startdate,enddate)
Date(dateid,date)
StaffDay(sid,rid,dateid,starttime,endtime,duty)
sid,rid,dateid in the StaffDay table will be enforced
as a composite unique key.
Each staff member can have a different start/end times
on any given day and be working any day in any week.
I don't like using the composite key(just doesn't feel
right) or that I'll be uniquely identifying dates, seeing
as how a date is already unique but I'm at a loss of how else to do it.