Solved

Employee Shift scheduler in oracle database

Posted on 2011-03-01
3
580 Views
Last Modified: 2012-06-22
Hello,
I want to develop an application to maintain and to view the shift details of a team.

For example :
We have 6 members, 3 shifts 24/7 round the clock.

Each can work on any shift planed for each month, means we plan it monthly once when and in which shift someone has to come.

Someone can come from :
Monday to  Friday
Tuesday      to Saturday
Wednesday to Sunday
Thursday to Monday
Friday to Tuesday
Saturday to Wednesday
Sunday to Thursday

---- and may be one can come in 1st shift for two day and rest in 2nd shift
or also some one can some in 3rd shift for 3 days and rest in 2nd shift.

So my question is what is the best approach to do the structure for my DB.



0
Comment
Question by:pinkuray
3 Comments
 
LVL 11

Accepted Solution

by:
Akenathon earned 250 total points
ID: 35009533
You should start by gathering your use cases, your structure can vary depending on what you want to do with the information stored there.

Without any more information, you *could* normalize the shifts in a small table with 7 rows, then reference it from a table that has a shift_start_date, shift_end_date, and two FKs: one is the shift code, and the other is the worker code (I suppose you already have a table for your employees).
0
 
LVL 28

Assisted Solution

by:Naveen Kumar
Naveen Kumar earned 250 total points
ID: 35013318
ensure shift start date / shift end date are stored along with time portion in it so we don't need to have few other fields for storing time.
0
 
LVL 4

Author Closing Comment

by:pinkuray
ID: 35013544
I did the structure. Thanks for your information.
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Article by: Swadhin
From the Oracle SQL Reference (http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/queries006.htm) we are told that a join is a query that combines rows from two or more tables, views, or materialized views. This article provides a glimps…
Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now