This isn't really a Perl question, but there's plenty of database people here...
One thought is to use a table like this, where e_id is the employee id, i_id is the interviewee id ( assuming separate tables for employees and interviewees, with a primary key ), and the time period is a reference to a time slice. Let's say further that if an employee is unavailable, you schedule a 'dummy' interview with a special interviewee called 'Unavailable' ( id 0 below ). This lets you avoid having to have entries for every possible time slice. The assumption is that employees are available more often than not - otherwise, change 'Unavailable' to 'Available' and test accordingly.
e_id i_id time_period
-------------------------
122 204 4
104 0 6
122 114 1
194 0 2
194 0 3
In this example, employee 122 has interviews in time segments 1 and 4 ( perhaps 8:30-9:00 and 10:00 - 10:30 ), and employee 194 is unavailable from 9:00 to 10:00.
Does that help?
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.