Hi,
I'm looking for a little advice on how to set up part of a database. I've been asked to make one to keep details of around 300 employees, including their shifts. Their shifts is the main thing that we will be pulling from the database as this is to be used for resource planning.
The problem is that not everyone works a regular shift (e.g start at 08:00, lunch at 12:00 home at 16:00) so the database needs to be able to store irregular shifts (e.g start at 10:45, have 20 minutes of their lunch break at 13:30 and the other 40 minutes at 15:30 then go home at 6:30) We also have some staff who work a part shift in the morning, then a part shift in the evening of the same day.
We ideally want to output staff shifts in a useful format so they can be used in our Excel sheets to show which staff are available at certain times. The Excel sheets show staff shifts in a grid, so for each 30 minute interval of the working day they will have a 1 if they are available, a L if they are on lunch and some other codes to show otherwise unavailable.
I've got a few ideas for how we can do this but I'm not sure if any of them are very good or easy to work with.
1. Store the shifts for each agent on a per day basis in a text field in a format like:
"SS10:45 LS13:30 LE13:50 LS15:30 LE16:10 SE18:30" (SS = shift start, LS = LS etc...)
2. Store the shifts for each day like this:
"0000000AAAAAAAALAAAALLAAAA0000" (0 = not working, A = available, L = lunch)
3. Have several fields for each day like [MondayStart], [MondayLunchStart],[MondayLunchEnd],[MondayLunchStart2], etc...
I can see a reason for doing it any of the 3 ways, but I don't think any of them are ideal. I'm hoping somebody has already had to make something like this and has some better ideas for how to achieve what I need. How would you do it?
I should add that I'm ok with VBA code, so exporting the info to Excel isn't a big issue. The main thing is being able to store these weird staff shifts and display/update them without too much trouble.
Thanks in advance
Duane
I'm looking for a little advice on how to set up part of a database. I've been asked to make one to keep details of around 300 employees, including their shifts. Their shifts is the main thing that we will be pulling from the database as this is to be used for resource planning.
The problem is that not everyone works a regular shift (e.g start at 08:00, lunch at 12:00 home at 16:00) so the database needs to be able to store irregular shifts (e.g start at 10:45, have 20 minutes of their lunch break at 13:30 and the other 40 minutes at 15:30 then go home at 6:30) We also have some staff who work a part shift in the morning, then a part shift in the evening of the same day.
We ideally want to output staff shifts in a useful format so they can be used in our Excel sheets to show which staff are available at certain times. The Excel sheets show staff shifts in a grid, so for each 30 minute interval of the working day they will have a 1 if they are available, a L if they are on lunch and some other codes to show otherwise unavailable.
I've got a few ideas for how we can do this but I'm not sure if any of them are very good or easy to work with.
1. Store the shifts for each agent on a per day basis in a text field in a format like:
"SS10:45 LS13:30 LE13:50 LS15:30 LE16:10 SE18:30" (SS = shift start, LS = LS etc...)
2. Store the shifts for each day like this:
"0000000AAAAAAAALAAAALLAAAA0000" (0 = not working, A = available, L = lunch)
3. Have several fields for each day like [MondayStart], [MondayLunchStart],[MondayLunchEnd],[MondayLunchStart2], etc...
I can see a reason for doing it any of the 3 ways, but I don't think any of them are ideal. I'm hoping somebody has already had to make something like this and has some better ideas for how to achieve what I need. How would you do it?
I should add that I'm ok with VBA code, so exporting the info to Excel isn't a big issue. The main thing is being able to store these weird staff shifts and display/update them without too much trouble.
Thanks in advance
Duane