473,408 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

help with design

Hi all

I have created a staff scheduling database which has actually been
rolled out. However, at the moment the user has to schedule teams to
specific hours by selecting the appropriate date and team and then
choosing a shift pattern from a combo box. However, it has now been
decided that there will be a pattern to the shifts the team works
which will roll round on a nine week basis.

So far I have created 2 extra tables in my database as follows:-

tblTeamShifts
================
ID - autonumber
TeamName
WK1
WK2
WK3
etc down to WK9 - these are lookup fields to tblShiftPatterns table
below - shiftID

tblShiftPatterns
================
ShiftID = primary key values = A, B, C, D etc
Monday
Tuesday
Wednesday
etc through to Sunday - these fields lookup to tblShifts table which
define a shift start and end time and a lunch start and end time.

My aim is to be able to identify for any date in the future (or past)
what shift a team will be working. WK1 in tblTeamShifts table
represents the week beginning 1 March 2004. Other functions in the
database require that the team shift data is always available, ie when
booking somebody on a half day leave need to know what shift they are
rostered to work so that can adjust their work times accordingly.

I would be grateful for any advice/help anyone can give me.

thanks
Michelle
Nov 12 '05 #1
4 1233
Hi Michelle,

Here's a hint about designing tables --

Any time you see repeating fields in a table, that indicates your design is
incorrect and will lead to trouble. In your table, tblTeamShifts, you repeat
WK1, WK2, WK3, etc. In your table, tblShiftPatterns, you repeat Monday, Tuesday,
Wednesday, etc.

Back to the drawing board!
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com


"Michelle" <mi*************@poferries.com> wrote in message
news:72**************************@posting.google.c om...
Hi all

I have created a staff scheduling database which has actually been
rolled out. However, at the moment the user has to schedule teams to
specific hours by selecting the appropriate date and team and then
choosing a shift pattern from a combo box. However, it has now been
decided that there will be a pattern to the shifts the team works
which will roll round on a nine week basis.

So far I have created 2 extra tables in my database as follows:-

tblTeamShifts
================
ID - autonumber
TeamName
WK1
WK2
WK3
etc down to WK9 - these are lookup fields to tblShiftPatterns table
below - shiftID

tblShiftPatterns
================
ShiftID = primary key values = A, B, C, D etc
Monday
Tuesday
Wednesday
etc through to Sunday - these fields lookup to tblShifts table which
define a shift start and end time and a lunch start and end time.

My aim is to be able to identify for any date in the future (or past)
what shift a team will be working. WK1 in tblTeamShifts table
represents the week beginning 1 March 2004. Other functions in the
database require that the team shift data is always available, ie when
booking somebody on a half day leave need to know what shift they are
rostered to work so that can adjust their work times accordingly.

I would be grateful for any advice/help anyone can give me.

thanks
Michelle

Nov 12 '05 #2


OK - thanks for that. How about:-

tblShiftPattern
================
ShiftID = autonumber
ShiftPatternID = A,B,C,D,E,F,G,H,I
ShiftDate
Shift = lookup to tblShift which determines start and end time of shift,
and start and end time of lunch break

tblTeamShifts
=============
TeamName - lookup to tblTeams
ShiftDate
ShiftPatternID - lookup to tblShiftPattern, ShiftPatternID

thanks
michelle

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
Here are the tables you need:
TblStaff
StaffID
FName
LName

TblStaffTeam
StaffTeamID
StaffID
TeamName

TblShiftPattern
ShiftPatternID
WeekDay
WeekNum
StartTime
EndTime
LunchStartTime
LunchEndTime

TblTeamShiftSchedule
TeamShiftScheduleID
StaffTeamID
ShiftPatternID

Since a team's schedule rolls around on a nine week schedule, you need to have
nine records in
TblTeamShiftSchedule for each team.

Next you need to develop a function that calculates what week number a selected
date falls into. The calculation needs to include the week beginning March 1,
2004 since by definition that is week 1. Since the schedule rotates through nine
weeks, the week number can not be associated with the calendar week number
because 52 is not evenly divided by 9.

Once you have done the above, then to identify for any date what shift a team
will be working, you use DLookup on a query that joins TblShiftPattern and
TblTeamShiftSchedule for ShiftPatternID with a where clause containing the
function that calculates what week number a selected date falls into.
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com
"Michelle" <mi*************@poferries.com_NOSPAM> wrote in message
news:40*********************@news.frii.net...


OK - thanks for that. How about:-

tblShiftPattern
================
ShiftID = autonumber
ShiftPatternID = A,B,C,D,E,F,G,H,I
ShiftDate
Shift = lookup to tblShift which determines start and end time of shift,
and start and end time of lunch break

tblTeamShifts
=============
TeamName - lookup to tblTeams
ShiftDate
ShiftPatternID - lookup to tblShiftPattern, ShiftPatternID

thanks
michelle

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #4


Thanks very much

That should keep me busy for a while

Will post again to let you know how I am getting on.

Cheers
Michelle

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: PHPkemon | last post by:
Hi there, A few weeks ago I made a post and got an answer which seemed very logical. Here's part of the post: PHPkemon wrote: > I think I've figured out how to do the main things like...
1
by: Krist | last post by:
Hi All, There is some additional info I forget on this same topic I just posted. I have a database design question, pls give me some help.. I want to define tables for salesman's sales target...
0
by: Jim | last post by:
I need some help getting started with a .NET web project for a commercial site. I am new to .NET and my understanding of some (but not all) of its concepts is a little sparse. I apologize for the...
9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
2
by: Carlo, MCP | last post by:
Hi, Sorry for posting twice, but I hope in your comprehension. Please help me! I'm troubling from months with a serious serialization problem that I'm not able to solve. I try to describe as...
2
by: Steve K | last post by:
I got a bit of a problem I like some help on. I'm designing an online training module for people that work in food processing plants. This is my target audience. These workers have little or no...
7
by: david | last post by:
I have asked this question before. But it does not work for me. Given radion buttons in the web form design page. What I did is described as follows. A panel control is dragged into the design...
10
by: David Thielen | last post by:
Hi; I have help html pages for each page of my ASP.NET webapp. So for the page datasource.aspx, I have help\datasource.htm. Bu what I want when the hyperlink is clicked, for it to look for the...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
2
by: Startup | last post by:
Hello Guys and Gals I have started web site called indiaclaims.com. I am not happy with the design of the main page. Iam a novice and a non - techie. Can anybody help me with a smart...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.