Results 1 to 3 of 3
  1. #1
    Join Date
    Dec 2005

    Unanswered: Help needed with Relationship and Tables

    I am doing a project and part of that is creating a Access database. I am new to relationship database. Every time I look at it I seem to need a new table.
    The project is about a PLAYER who runs COMPANY which provides EMPLOYEES to LABOUR USERS. The EMPLOYEEs are driven by DRIVERS in VEHICLES. On regular basis VEHICLES undergo VEHICLE STOP checks.

    1) PLAYER can have Many COMPANY but COMPANY can have only one PLAYER.
    2) COMPANY can have Many LABOUR USER but LABOUR USER can have only one COMPANY.
    3) COMPANY can have Many EMPLOYEE but EMPLOYEE can also have many COMPANY.
    4) COMPANY can have Many VEHICLE but VEHICLE can have only one COMPANY.
    5) DRIVER can drive many VEHICLE and VEHICLE can have Many DRIVER
    6) VEHICLE STOP can have many VEHICLE and VEHICLE can have many VEHICLE STOP

    Please have a look at my tables and tell me if I am doing it right or I need more tables. I got myself in a bt of a mess and I am now confused. Can you also tell me how the tables are connected. Very grateful for your answers in advance. Please see attachment.

    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2004
    Chicago, IL
    It looks like you are on track for your one-to-many tables/relationships. But you don't have your many-to-many relationships defined. Any many-to-many relationship will require three tables. For example your Company to Employee relationship, you need a CompanyEmployee table that has CompID and EmpID as fields. This table would allow you to show that EmpID 1 is an employee at CompID 1 and 2 and also CompID 1 has employees 1 and 4. To complete the relationships you would connect the Company.CompID to the CompanyEmployee.CompID field and the Employee.EmpID field to the CompanyEmployee.EmpID filed.

    Hopefully that helps you out a little. I doubt you will get many other responses. Typically people don't reply to help with school work.

  3. #3
    Join Date
    Dec 2005

    Help needed with Relationship and Tables

    Thank you very much for your help, I will give that a go,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts