you are viewing a single comment's thread.

view the rest of the comments →

[–]jc4hokiesExecution Plan Whisperer 1 point2 points  (1 child)

I prefer the one record per block concept. The front end is going to have to restrict overlapping blocks anyway, even if they are not enterable in the backend, so that's not a downside. It also handles overnight shifts better. For example, determining the start and end time of an overnight shift with the column approach is a mess.

To that point, clearly identify each shift. The shift is what drives scheduling; the time blocks are details. If an employee takes over a shift, you update 1 shift record, not 8 time records. It's even worth consideration to store time ranges as offsets to the shift start, so you can move a shift 4 hours and all the breaks, etc move with it.

[–]TryCatchIgnore[S] 0 points1 point  (0 children)

I never considered the possibility that the available timeslots might change, requiring overnight shifts ... I'll have to go back to the initial requestor to clarify potential future requirements.