Results 1 to 4 of 4
  1. #1
    mikerada6 is offline Member
    Join Date
    Oct 2010
    Posts
    10
    Rep Power
    0

    Default employee availability

    i am creating a program that will allow me to work with employee availability and create weekly schedule. I want to use databases to do so. My original idea was to create a database for availability. this would have each employee's ID number and MondayIn, MondayOut, TuesdayIn, TuesdayOut, etc. However the business this program is being written for opens at different times every day and it is very common for an employee availability to simply be Open to 5. or 3 to close. Therefore my timein data could not be stored as "TIME" and would make it difficult to perform searchs based on time data. What would be good way to store the fact that Employee A can work open to close, while Employee B can work 9 to close and Employee C can work 10 AM to close?

  2. #2
    travishein's Avatar
    travishein is offline Senior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    684
    Rep Power
    5

    Default

    what if you assigned an identifier or a bit field , or a column, for each hour or half hour of the working day. for example, 8, 9, 10, ...5 could be mapped to 'bits' in an string expression. 1111111111 to mean all day, or 0000011111 to mean from 1 to 5 pm.

  3. #3
    mikerada6 is offline Member
    Join Date
    Oct 2010
    Posts
    10
    Rep Power
    0

    Default

    I like the idea however if a person says they can "close"how long should the string be as it is common for a closing shift to go until 2, 3, or even 4 the next morning

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default

    This is possibly where you want two extra columns, as flags.
    An "open" column and a "close" column. If the flags are set on these then the open_time or close_time TIME fields aren't used. If they aren't set, then the TIME fields are used.

Similar Threads

  1. employee
    By srish in forum Suggestions & Feedback
    Replies: 7
    Last Post: 07-21-2010, 04:52 AM
  2. search employee id
    By raman_v in forum Java Servlet
    Replies: 2
    Last Post: 12-24-2009, 08:44 AM
  3. [SOLVED] TCP chat test availability server
    By Koren3 in forum New To Java
    Replies: 16
    Last Post: 05-02-2009, 12:55 PM
  4. JDK availability in Testing server
    By curesh in forum Suggestions & Feedback
    Replies: 6
    Last Post: 01-26-2009, 03:33 AM
  5. Replies: 0
    Last Post: 07-07-2008, 04:35 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •