Newbies geekinthegarden Posted December 23, 2005 Newbies Posted December 23, 2005 okay... i've got three tables: clients, employee, jobs. jobs is the primary table. each job can only have one client but can have multiple employees. my problem, is that i seem to only be able to register only one employee name to each job. the relationship is based on the field "employee name" which, in the employee table is a calculation combining first name and last name. what do i need to do to be able to assign multiple employees to each job?
aaa Posted December 23, 2005 Posted December 23, 2005 Create relation one to many between Jobs and Employee by Job_Id which you must have in the Jobs and Employee table.
Ender Posted December 27, 2005 Posted December 27, 2005 If an Employee might be assigned to more than one Job, then add an Employee_Job join table, linked to Employee by EmployeeID and to Job by JobID. Then use an Employee_Job portal on either an Employee layout or a Job layout for adding Employee_Job instances.
MetaSys Software Posted December 28, 2005 Posted December 28, 2005 Hi, There can be one more mechanism to achieve this... In Jobs table create one more field say employee_Id.. and store all related employee_ids separated by carriage return in that field. Regards, MetaSys
Ender Posted December 29, 2005 Posted December 29, 2005 Hi, There can be one more mechanism to achieve this... In Jobs table create one more field say employee_Id.. and store all related employee_ids separated by carriage return in that field. This multi-line key will work if you don't need to track job assignment dates or other details about each job assignment. If you do need to remember things about job assignments, then stick with the join table.
Recommended Posts
This topic is 7246 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now