Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Help with Table design for scheduling
Old 10-15-2006, 12:31 AM Help with Table design for scheduling
Junior Talker

Posts: 2
Name: Alex
Trades: 0
This is non-specific to a particular Database system, my question has to do with how a table or a series of table might be setup I am decidedly, undecided on how to best set up this/these tables.

I am attempting to implement within a current RDB a way that people can be scheduled as in it is for scheduling, the reason it is to be in the database is to pull an hours report that is updated as the schedule is updated. Additionally the database contains all the employees therefore the forms use lookups from the employee tables to make scheduling easier for the scheduler.

I know the information that needs to be in this and I get the general idea of how it needs to be setup.

We need to have 7 days for the week and the vehicle and shift information (i.e the hours the shift is scheduled) so if we looked at it flatly on paper it would be a grid, where the shifts are veertical and the days are horizontal and by following the grid horizontally from a shift you find out who is in the shift for a given day, basically I think you get the idea of what it looks like. The data that is contained in each grid spot is as follows:

Employee1
Comment for emp1 i.e. if they are leaving early/coming in late
Employee2
Comments emp2
Employee3
comments emp3
Comments about specific shift i.e. It is for a special event

Then for a shift on the weekly basis ( for the entire week) we need a comments field so that for instance a comment may be made that on sat and sun the shift is not 0800-1600 it is 0900-1500 hours.

As I had it originally setup as it was all I could think of it initially is that each record is a shift for the entire week i.e. 0800-1600 shift would have 21 fields for emp named monemp1, monemp2, monemp3, tueemp1, tueemp2, ... and so on for the entire week. which seemed way too convoluted to me, but it worked, except I was never able to pull data properly to create an hours report. This was of no great consequence as the scheduler refused to use the DB to schedule and stuck to Excel spreadsheet. But there is a new scheduler who wants to use it, but I had to implement some changes anyways to extend how far out he could schedule therefore I thought it best to recify the haphazard table setup. Problem is I still can't figure out how to do it right.

Should I make a table for each day of the week and each record is the shift and employee info? (This doesn't seem to be logical for me because they need to add delete shifts on a weekly basis (i.e. for everyday of the ween and they are not going to want to have to do it each individual day)

Should there be one table for one week that contains all the data and each record be the shift and then the employee info for the entire week?

Should there be a sperate entry with shift info for each employee with the table setup as above in the previous example except that instead of three entries per record for employees there only be one, with duplication of the shift info for each record? (Seems this wouldn't work so well either due to similar problems as in question one above)

Should it be setup where there is a table of days, then a table of shifts, and the table of shift is one grid with the employee infor and then the shift/vehicle info with a field that corresponds to a day and have each. (Seems an awful lot like the first solution that I didn't think would work due to the need to add/remove shifts)

Is the way I have it setup now the mostideal for this situation?\

Thanks in advance for any help, it will grreatly be appreciated.

Alex
scheidel21 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 10-15-2006, 01:11 AM Re: Help with Table design for scheduling
Banned

Posts: 25
Trades: 0
I Need a 'joke of the day script' can anyone help? But i would like to be able to display a couple of sentences if required.
I got one but it only works fine with small amount of charactors after that i get a 'java script error.

the code is below... if you think something isnt right plese let me know.
-------------------------------------------------------

<table border="0" width="100%" bgcolor="#E8E8E8" cellspacing="0" cellpadding="0">
<tr><td width="100%">

<script>
<!--

var today_obj=new Date()
var today_date=today_obj.getDate()

var tips=new Array()
//Configure the below variable to contain the "header" of the tip
var tiptitle='<img src="../../tip.gif"> <b>Joke of the day</b><br>'

//Configure the below array to hold the 31 possible tips of the month
tips[1]='Tip 1 goes here'
tips[2]='Tip 2 goes here'
tips[3]='Tip 3 goes here'
tips[4]='Tip 4 goes here'
tips[5]='Tip 5 goes here'
tips[6]='Tip 6 goes here'
tips[7]='Tip 7 goes here'
tips[8]='Tip 8 goes here'
tips[9]='Tip 9 goes here'
tips[10]='Tip 10 goes here'
tips[11]='Tip 11 goes here'
tips[12]='Tip 12 goes here'
tips[13]='Tip 13 goes here'
tips[14]='Tip 14 goes here'
tips[15]='Tip 15 goes here'
tips[16]='Tip 16 goes here'
tips[17]='Tip 17 goes here'
tips[18]='Tip 18 goes here'
tips[19]='Tip 19 goes here'
tips[20]='Tip 20 goes here'
tips[21]='Tip 21 goes here'
tips[22]='Tip 22 goes here'
tips[23]='Tip 23 goes here'
tips[24]='Tip 24 goes here'
tips[25]='Tip 25 goes here'
tips[26]='Tip 26 goes here'
tips[27]='Tip 27 goes here'
tips[28]='Tip 28 goes here'
tips[29]='Tip 29 goes here'
tips[30]='Tip 30 goes here'
tips[31]='Tip 31 goes here'

document.write(tiptitle)
document.write(tips[today_date])

//-->
</script>

</td></tr></table>
<p align="center"><font face="arial" size="-2">Joke of the day</font><br>
<font face="arial, helvetica" size="-2"><a href="http://www.CircleOfLinks.com.au">CircleOfLinks</a></font></p>
VidStars is offline
Reply With Quote
View Public Profile
 
Old 10-15-2006, 02:55 AM Re: Help with Table design for scheduling
Junior Talker

Posts: 2
Name: Alex
Trades: 0
Ok Vidstars I don't see why your code should give you a problem with a larger amount of text, what happens when you use a large amount of text?

Now on to something else, WHY IN H E double hockey stixks did you post this here, it has nothing to do with my problem, is totally unrelated entirely, and obviously due to the two afore mentioned reasons does me no good. Why didn't you just start a new thread?

Oh well

Alex
scheidel21 is offline
Reply With Quote
View Public Profile
 
Old 10-15-2006, 07:44 AM Re: Help with Table design for scheduling
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,519
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
VidStars has some agenda of his/her own and has been banned for the privilege.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 10-15-2006, 02:21 PM Re: Help with Table design for scheduling
Banned

Posts: 82
Trades: 0
he/she is banned haha
Writer is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Help with Table design for scheduling
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.85485 seconds with 12 queries