Relationship query

G

Guest

Hello all! I am having difficulty deciding what type of relationship i should
give between 2 tables. The table names are 'employees' and 'payslip'. Below
is the list of fields in these tables:
TABLE EMPLOYEES: PK empid, empname,emp address, emp hourly wage ect....
TABLE PAYSLIP: PK PaylsipID, payslip date,empid, hours worked,

My question is regarding the relationship between empid to empid for the two
tables. The payslip table will act as a table to store payslips for different
dates and store employeeids as a way off knowing which employee has been paid
what amount each month. Which type of relationship do i need from the empid
from the employees table to teh empid in the payslip table. Do i need a
1-many from the employees table(empid field) to the payslip table(empid
field) or a 1-many from the payslip table(empid field) to the employees
table(empid field)????

All help would be great :)
 
G

Guest

You need a 1-many from the employees table(empid field) to the payslip
table(empid field) as for every one employee there will be many payslips.
 
G

Guest

thanks for the help karl, spot on!!!! have a nice day :) ur help has been
highly appreciated.
 
S

Smartin

Ben said:
Hello all! I am having difficulty deciding what type of relationship i should
give between 2 tables. The table names are 'employees' and 'payslip'. Below
is the list of fields in these tables:
TABLE EMPLOYEES: PK empid, empname,emp address, emp hourly wage ect....
TABLE PAYSLIP: PK PaylsipID, payslip date,empid, hours worked,

My question is regarding the relationship between empid to empid for the two
tables. The payslip table will act as a table to store payslips for different
dates and store employeeids as a way off knowing which employee has been paid
what amount each month. Which type of relationship do i need from the empid
from the employees table to teh empid in the payslip table. Do i need a
1-many from the employees table(empid field) to the payslip table(empid
field) or a 1-many from the payslip table(empid field) to the employees
table(empid field)????

All help would be great :)

Ask yourself, "Does one employee have many payslips, or does one payslip
have many employees?"

Does this help?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Need Help... 4
Using Bound Control right 3
Query Input 1
UNION query 11
Record Review Process 2
Append Query 11
Need Help... 5
Using Junction Tables 4

Top