I’m looking for some guidance as to how to set up a database I am creating. I think the best way to ask the question is to describe the specific scenario:
I have a database that will hold information about student-employees at a school.
I have one table called “Semesters” that contains information about a specific semester (e.g. “Fall/Spring/Summer”, year, etc.).
I have another table called “Employees” that contains information about a specific student-employee (e.g. name, jobTitle, startDate, endDate). I would also like to have a reference to the “Semesters” table indicating which semester(s) the employee was hired. So, for example, one column in the “Employees” table would tell me that this specific employee was working during the “Fall2010, Spring2011, and Fall2011” semesters.
The problem is that I don’t know how to reference several records in one field.
I am sure that this is a fairly common scenario, I’m just not sure how to go about it.
Answers that reference MS Access or SqlServer would be excellent.
Thanks.
This sounds like a many to many relationship. In such a case you would likely utilize a junction table.
Employees (empID, name)
Semesters (semID, name)
EmploymentHistory (empID & semID)