Page 1 of 3 123 LastLast
Results 1 to 15 of 31
  1. #1
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39

    Project Involving Table Relationships

    Hi!



    So I've been given this project where I have to develop an access 2007 database where a query can be used to match employees to available projects based on employee skill set and required project skills.

    How should I go about this?

    I've tried making a bunch of tables and relating them, but its not matching employee skills to project skills!

    PLEASE HELP!

    Thanks!
    Anne

  2. #2
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    A few questions:
    Does the employee have to match all of the skills required for the project?
    How many employees will be on each project?
    Does each project have to have a set number of employees?

  3. #3
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39
    The employee has to match all of the skills.

    The project will not have a limit on employees. It will be a method of placing an employee on a current project after his/her project comes to an end.

    I tried splitting it into these tables:

    Employee names and skills (using a lookup to a seperate skills table)

    Projects

    Required skills for each project

    Skills

    I tried using a junction table and it still wouldnt work. I guess I can't visualize how it could even work.

  4. #4
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I think You will need 5 tables. tblEmployees, which has their information. tblSkills, which contains every skill. tblProjects, which contains all the different projects. tblEmployeeSkills, which will be a junction table for the M-M relationship between Employee and Skills. tblProjectSkills which will be a junction table for Project and Skills. You then query the junction tables for your criteria.

  5. #5
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39
    For the Skills Table would it be possible to use a lookup table for the skills or does each field have to be a different skill with a check box?

  6. #6
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I don't know why you would use a checkbox. For example:
    tblEmployee
    EmpID, EmpName
    1, John Doe
    2, Jane Smith

    tblSkills
    SkillID, SkillName
    1, computer
    2, labor
    3, math

    tblEmployeeSkills
    EmpSkillID, EmpID, SkillID
    1, 1, 1
    2, 1, 2
    3, 2, 1
    4, 2, 2
    5, 2, 3

    You don't need any checkboxes.

  7. #7
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39
    Because there are different levels of skill for example

    tblSkills Skill_ID Skill ACC1 MS ACCESS (Beginner) ACC2 MS ACCESS (Intermediate) ACC3 MSACCESS (Advanced) ARCGIS1 ESRI ARCGIS (Beginner) ARCGIS2 ESRI ARCGIS (Intermediate) ARCGIS3 ESRI ARCGIS (Advanced) C1 C# (Beginner) C2 C# (Intermediate) C3 C# (Advanced)

  8. #8
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I don't see why that's an issue. Lets say employee 1 is a beginner at all 3 and employee 2 is advanced in all 3. your junction table would look like:
    tblEmployeeSkills
    empSkillID, empID, skillID
    1, 1, ACC1
    2, 1, ARCGIS1
    3, 1, C1
    4, 2, ACC3
    5, 2, ARCGIS3
    6, 2, C3

    You do the same thing with the project and skills tables and then join the 2 junction tables on the skill and then do a count on how many match. If the total matched = total for the project, that employee has all of the requirements for the project

  9. #9
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39
    Where is empSkillID being pulled from? Or is it just a new field name?

  10. #10
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    It's just an autonumber field used as a primary key. You can choose to use a compound key with empID and skillID if you so wish, I just prefer a separate PK

  11. #11
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39
    Ok in tblProjectSkills table, how Can I assign more than one skill to a project? Can the skills be in one field separated by commas?

  12. #12
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    Nope. You would assign them the same way you gave each employee a skill. Lets say project A required skills ACC1 and C3 and project B required ACC1, ARCGIS2, and C1.

    tblProjectSkills
    projSkillID, projectID, skillID
    1, A, ACC1
    2, A, C3
    3, B, ACC1
    4, B, ARCGIS2
    5, B, C1

  13. #13
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39
    Ok see the issue is that I originally assigned skills as a lookup column so each person could have multiple skills for each row.

  14. #14
    annemrosenberg is offline Expert in Training
    Windows 7 64bit Access 2007
    Join Date
    Jul 2011
    Posts
    39
    BUT, I see How you are doing it, so I'm trying all this now.

  15. #15
    TheShabz is offline Court Jester
    Windows XP Access 2003
    Join Date
    Feb 2010
    Posts
    1,368
    I avoid lookup tables/fields in general. I don't even know how to query off of one =P

Page 1 of 3 123 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Table Relationships
    By ledbyrain in forum Access
    Replies: 1
    Last Post: 09-07-2010, 05:05 PM
  2. Plz help Table Relationships
    By heominhon127 in forum Database Design
    Replies: 6
    Last Post: 09-06-2010, 01:36 PM
  3. Table Relationships
    By goestejs in forum Database Design
    Replies: 3
    Last Post: 08-23-2010, 07:39 AM
  4. Query involving data from different sources
    By nodnud in forum Queries
    Replies: 1
    Last Post: 08-12-2010, 06:11 PM
  5. Table Relationships
    By seanp in forum Access
    Replies: 2
    Last Post: 04-15-2010, 07:12 AM

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