Solved

Employee Shift scheduler in oracle database

Posted on 2011-03-01
3
582 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

914 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