M
Michael
Can someone give input on table design?
I'm setting up a database which will be used to generate employee schedules for the
Emergency Department. I need to schedule 18 employees every 24 hours. Shifts are
mostly 12 hrs long, with some minor deviations. The shifts start at different times during
the 24 hr period, and employees will not always be working the same shift hours from
day to day.
I've generated the following table structure and am using it with some success:
The advantage here is that I enter the date once and then use the tab-or-enter key to
start filling in the shifts from morning to night using a lookup field for the employee. I'm
having some trouble getting the information out of the tables using this structure.
tblEmployees
EmplID
Name
etc.
tblSchedule
Date
7am1
7am2
7am3
7am4
9am
11am
etc.
My other alternative is:
Data entry is much more cumbersome with this structure (entering a date with each
record - eighteen entries for each day), but getting information out of the tables for
reports is simple.
tblEmployees
EmplID
Name
etc.
tblShifts
ShiftID
ShiftName
tblSchedule - this table holds linked fields to the other tables.
Date
ShiftID
EmployeeID
From a developers standpoint, which table structure makes the most sense??
Thanks for the input.
Michael
I'm setting up a database which will be used to generate employee schedules for the
Emergency Department. I need to schedule 18 employees every 24 hours. Shifts are
mostly 12 hrs long, with some minor deviations. The shifts start at different times during
the 24 hr period, and employees will not always be working the same shift hours from
day to day.
I've generated the following table structure and am using it with some success:
The advantage here is that I enter the date once and then use the tab-or-enter key to
start filling in the shifts from morning to night using a lookup field for the employee. I'm
having some trouble getting the information out of the tables using this structure.
tblEmployees
EmplID
Name
etc.
tblSchedule
Date
7am1
7am2
7am3
7am4
9am
11am
etc.
My other alternative is:
Data entry is much more cumbersome with this structure (entering a date with each
record - eighteen entries for each day), but getting information out of the tables for
reports is simple.
tblEmployees
EmplID
Name
etc.
tblShifts
ShiftID
ShiftName
tblSchedule - this table holds linked fields to the other tables.
Date
ShiftID
EmployeeID
From a developers standpoint, which table structure makes the most sense??
Thanks for the input.
Michael