Results 1 to 4 of 4
  1. #1
    SansPeur is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    9

    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!

  2. #2
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    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.

  3. #3
    SansPeur is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2012
    Posts
    9
    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.

  4. #4
    Rainlover's Avatar
    Rainlover is offline Expert
    Windows 7 64bit Access 2003
    Join Date
    Nov 2009
    Location
    Queensland Australia
    Posts
    691
    Welcome and Best wishes for the Project.

Please reply to this thread with any new information or opinions.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums