-
Many-to-man or One-to-many?
I am developing an employee database that will store their role.
tblEmployee
EmployeeID (PK, autonumber)
LastName (Text)
FirstName (Text)
tblRoles
RoleID (PK, autonumber)
Role (Text)
tblEmployeeRoleJunction
EmployeeRoleID (PK, autonumber)
EmployeeID (FK, long integer)
RoleID (FK, long integer)
Each Employee will have a single role, and one role will apply to many of the employees. Is this a Many-to-many or One-to-many relationship? If One-to-many, do I place FK RoleID (from tblRole PK) in tblEmployee, or FK EmployeeID (from tblEmployee PK) in tblRole? Thanks!
-
One to Many
Place FK in tblEmployees
The Join table is not necessary.
Many to Many would occur if there were many Roles and each Employee could have more than one Role.
-
Thanks Rainlover, that's what I thought but been looking at this design (that part is just a portion of the entire database) for days now and wanted to be sure I wasn't over-analyzing. Definitely appreciate the response.
-
Welcome and Best wishes for the Project.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules