The Design of Software (CLOSED)

A public forum for discussing the design of software, from the user interface to the code architecture. Now closed.

The "Design of Software" discussion group has been merged with the main Joel on Software discussion group.

The archives will remain online indefinitely.

Shift/Roster schema question

How would you go about designing a database structure to hold shift/roster times? It must support overlapping shift types, such as a night shift (4pm-11pm) in a restaurant but with a 5-6pm happy hour. The shift can then have a set discount or similar associated with it.

I'm thinking about a ShiftStructure type table which defines start/end dates, start/end times etc..

When the server boots up it will see if the shift structures for the 'current time' exist in a Shift table. The server can keep track of a list of current Shifts and assign them to invoices created on that shift.

I'd have to have some timer type functionality that can detect when a new shift starts and a current shift ends.

I started looking into all this but it is seeming a little complicated and just wondering if any joelonsoftware'rs have built something similar and can give any tips.

Thanks
gommo Send private email
Wednesday, October 25, 2006
 
 
>joelonsoftware'rs have built something similar and can give any tips

Gavin Bowman has, but he might not be keen to share tips with potential competition.
Andy Brice Send private email
Wednesday, October 25, 2006
 
 
hehe, I dont know about competition, I'm in Australia and writing this for someone who already has an old aging retail POS system. So our clients are already set, at least initially :)

What do people think about not using the Shift idea above but rather track which invoices have not been 'processed' by marking them when a 'end of shift' report type thing is run. Any invoices that are not marked are then classed as being against that 'shift'.?? It would simply things greatly and at least in my case, probably be what the client wants anyway.
gommo Send private email
Wednesday, October 25, 2006
 
 
I have built a similar system as an academic exercise, and I initially wrote up a list of recommendations, but I realized that my homework assignment is probably not the same thing as your real life problem. More specifically...

Do you need to record who worked which shifts on which calendar days for however long the business last?  I.e., should an auditor be able to come in and see who worked the morning shift January 23rd, 1986?

Is it possible for someone to be scheduled to work multiple, irregular shifts?  I.e., if there's been a break-in, I can hire a watchman to come in and work 12 hours straight three days in a row. Alternatively, if I'm a hospital, I can simply tell a resident to work from Monday 9:30 AM to Wednesday 10:00 PM.

And so on...

I think the key issue is whether you're allowed to define generic rules describing shifts (every weekday morning), or if you need to specify specific start dates and times, and preserve those specifications (3:00 PM to Midnight, Saturday night when the circus is in town).
TheDavid
Wednesday, October 25, 2006
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics
 
Powered by FogBugz