Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3330644
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T23:30:39+00:00 2026-05-17T23:30:39+00:00

I am designing a scheduling system for many employees to work around the clock

  • 0

I am designing a scheduling system for many employees to work around the clock from home. When a new event is scheduled by a user (1 hour long event, starting on the hour, 24 hour choices), the system needs to allow our users to select which employee they want to have work for them. I need to report who is available at that exact time. We have over 100 employees, and their availability changes frequently.

schedule table:
EventID
EmployeeID
startTime (datetime)
endTime (datetime)

availability table:

EmployeeID
00:00
01:00
02:00
03:00
...
23:00

Records in the availability table are stored as a varchar(7). Length of 7 is for each day of the week. Never available at this timeslot is ‘0000000’. Always available at this timeslot is ‘1111111’. Available only on Tuesday at this timeslot is ‘0010000’.

EDIT: this information is for one week, hence the 7 char length. From this week and into infinity, this table design assumes that the employee will be available at the same time each week (unless they are working). Of course, the employee can change their availability, and then the table can reflect those changes from that point forward. /EDIT

Finding out what employees are available at any given time requires a lot of looping which obviously bogs down the system and is not good for anyone.

This is the best way I have come up with to implement this system, short of possibly having a table to store each employee’s availability. I realize mine is a terrible method. Can someone please point me in the right direction?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-17T23:30:40+00:00Added an answer on May 17, 2026 at 11:30 pm

    Have a different table to store the employees’ availability. I don’t see why you shouldn’t.

    You should always avoid putting multiple data fields in one column (as your varchar column). I propose one row per employee, timeslot and day. That way you can speed up the queries a lot by indexing.


    Even if you keep your ugly “everything-in-one-column approach” you should change to a CHAR because right now you’re using up a byte per row just to keep the size of the column, even though it’s always 7 chars long. Or even better, use a TINYINT (1 byte) and store the availability as binary flags. But of course, avoid this at all costs – you really do want to normalize your database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Designing a new system from scratch. I'll be using the STL to store lists
When designing user table what would be the must have fields from the security/user
When designing a new testing system, Should I keep tests in tree with the
Sometime back while designing something that included user management, I was required to have
I'm designing help/hint system for my webpage, I'd like to incoroporate jQuery based contextual
When designing a new Crystal Report you have to create a new database connection.
While designing a fairly simple backup system for Linux in python, I'm finding myself
When designing or looking at a new language, what are the limits of features
In designing a new programming language, is it safe to assume that a C
When designing an internation registration form how should I be asking for a user's

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.