473,378 Members | 1,415 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,378 software developers and data experts.

help with table design/relationship

Hello,

I am designing tables for a timesheet project.The details of the table
are as follows
Employeedetails (tableName)

EmployeeNumber
SocialSecurity
Title
Position

TimeSheet(tableName)

EmployeeNumber
date
Day
TimeIN
TimeOut
TotalHrs

EmployeeWorkSiteDetails(table Name)

Employee Number
WorkSite
Date
Day

I have created a relationship b/w
Employeedetails.EmployeeNumber - TimeSheet.EmployeeNumber
EmployeeDetails.EmployeeNumber -
EmployeeWorksitedetails.EmployeeNumber.

On the form When the user enters Timesheet details , I need to insert
the WorkDate and Day from the timesheet table into
EmployeeWorkSiteDetails.Workdate and EmployeeWorkSiteDetails.Day.

So do I have to create a relationship b/w Timesheet and
EmployeeWorksiteDetails.
And also How do I set the join types/Join properties when creating a
relationship.Do I keep it to default
Any input is highly appreciated

Thanks
Nov 12 '05 #1
3 1425
In database design, we aim to never store redundant data.
A lesser but useful goal is to reduce the amount of typing for the data
entry operator.

Your EmployeeDetails table is good. The TimeSheet table needs only:
EmployeeNumber Number (Long) Foreign key to EmployeeDetails.
StartDateTime Date/Time Date and time started work.
EndDateTime Date/Time Date and time finished work.

To create the relationship:
Tools | Relationships.
Drag EmployeeDetails.EmployeeNumber onto Timesheet.EmployeeNumber

User entry form will be a continuous form, with:
combo box for selecting the employee,
text box for StartDateTime
text box for EndDateTime

From that simple information, Access can give you the day name (from the
date) and the hours worked (difference between start and end times). The
structure even copes with shifts that span midnight if that's ever needed.

For help on how to calculate the time worked, see:
Calculating elapsed time
at:
http://allenbrowne.com/casu-13.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Doslil" <do****@hotmail.com> wrote in message
news:c6**************************@posting.google.c om...

I am designing tables for a timesheet project.The details of the table
are as follows
Employeedetails (tableName)

EmployeeNumber
SocialSecurity
Title
Position

TimeSheet(tableName)

EmployeeNumber
date
Day
TimeIN
TimeOut
TotalHrs

EmployeeWorkSiteDetails(table Name)

Employee Number
WorkSite
Date
Day

I have created a relationship b/w
Employeedetails.EmployeeNumber - TimeSheet.EmployeeNumber
EmployeeDetails.EmployeeNumber -
EmployeeWorksitedetails.EmployeeNumber.

On the form When the user enters Timesheet details , I need to insert
the WorkDate and Day from the timesheet table into
EmployeeWorkSiteDetails.Workdate and EmployeeWorkSiteDetails.Day.

So do I have to create a relationship b/w Timesheet and
EmployeeWorksiteDetails.
And also How do I set the join types/Join properties when creating a
relationship.Do I keep it to default
Any input is highly appreciated

Thanks

Nov 12 '05 #2
OK Now that I have only 2 tables.
EmployeeInformation(tableName)
EmployeeNumber
First Name
Last Name
Social Security Number
Title
Position

TimeSheet(table)

EmployeeNumber
worksite
Workdate
Day
TimeIn
TimeOut
{HHI
PH2 ---- These are the different worksites where the
---- total hours worked will be distributed
PH4
PH6}

I am trying to design a form with a subform.The main form has employee
number,FName,LName,Title.

The SubForm Has WorkDate,TimeIn,TimeOut.For the worksite field (this is
the main woksite which has a drop down list).The user selects this only
once - i do not want the user to enter this everytime he enters the
timein and timeout.I am trying to put this as another subform.But I am
getting error.Can you please guide me how will I go with this.

regards
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #3
> EmployeeNumber
worksite
Workdate
Day
TimeIn
TimeOut
{HHI
PH2 ---- These are the different worksites where the
---- total hours worked will be distributed
PH4
PH6}

I am trying to design a form with a subform.The main form has employee
number,FName,LName,Title.

The SubForm Has WorkDate,TimeIn,TimeOut.For the worksite field (this is
the main woksite which has a drop down list).The user selects this only
once - i do not want the user to enter this everytime he enters the
timein and timeout.I am trying to put this as another subform.But I am
getting error.Can you please guide me how will I go with this.


Umm... could you move, I can't see over your shoulder, so I can't see
the error message you're getting. i guess you could put the location
in the employee table... (not that I like it), but then you could set
the subform's default = to the value in the main form. Otherwise, you
could have the database get the last location for the current employee
using DLookup or something. Then You'd only have to set it once.

What's with the PH1...PH6? These should be separate records
(EmployeeID, PH#, DateIn, DateOut) or something like that.
Nov 12 '05 #4

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

Similar topics

18
by: Jeremy Weiss | last post by:
I'm trying to build a database that will handle the monthly billing needs of a small company. I'm charting everything out and here's what I see: table for customers sub table to track payments...
7
by: Marco Simone | last post by:
Hi, What is your opinion about using Lookup field in table. I would like to use lookup field in table 1, so that I can choose data in combo box from table 2. Is this good design of database? ...
0
by: leavandor | last post by:
I am trying to design a query that works with a relationship between a Table and a Query. I am comparing a value in the table with a computed value inside the query. The reason for this is that...
4
by: lorirobn | last post by:
Hello, I'd be curious to hear other thoughts on my database and table design. My database is for 'space use' in a lodging facility - will hold all spaces, like rooms (lodging rooms, dining...
9
by: DP | last post by:
hi., i've got 3 tables, customer, film and filmrental. i've got a customer form, with a sub form at the bottom, which is a film rental subform. i've created an update query, which when a...
117
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of...
6
by: Welie | last post by:
I am having a problem an it's driving me crazy, I hope someone can correct my technique. I can't find a pattern and don't know where to look to debug this. The problem is on a continuous form, the...
17
by: Stubert | last post by:
I have a training module db that stores information about employees and what training they have carried our or need to carry out. One table in this database stores what training needs to be carried...
1
by: roxys | last post by:
Hello, I was wondering if someone could help me a bit here. Im trying to desing an electronic university students enrollement system. The system requirements are as follows: 1.Students can...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.