in reply to Rostering Staff: Architecture? Not strictly Perl

Thinking about your data a litte, I would say choose the approach which works best for the fact that you are likely to have a flutuating employee list, whereas the shifts arent as likely to change. In my mind, that would explain a 'shift-is-worked-by' structure.

Or even, a date-oriented structure, since the shifts repeat themselves daily as well. So you'd have a table with shifts and shift IDs, a table with employees and employee IDs, and a table combining the two, mapping date, shift ID and employee ID together. This third table can then continue indefinitely (tho of course you'll probably want to periodically remove old data). It has a double-index of date and shift ID.

Code-wise, you then calculate 'today and next seven days', look up those dates in the table, translating shift IDs to times, and employee IDs to names as you go, and making some sort of hash:

%current = ( '2003-12-05' => { { 'time' => '9:00 AM', 'id' => 1, 'employee' => {'id' => 1, 'name => 'Fred Flintst +one', } }, { 'time' => '5:00 PM', 'id' => 2, 'employee' => { 'id' => 4, 'name' => 'Wilma', } { 'time' => '1:00 AM', 'id' => 3, 'employee' => { 'id' => 3, 'name' => 'Barney', } }, '2003-12-06' => { ... }
Which you can display and/or work on as required. I hope this makes some sort of sense, Im just thinking as I type (which sometimes has weird results..)

C.