Results 1 to 2 of 2

Thread: Table Structure

  1. #1
    Join Date
    Mar 2002
    Location
    Washington, D.C.
    Posts
    3

    Unanswered: Table Structure

    I am designing a database for law firm use. I have a "people" table and an "incident" table. It is a many to many relationship so I created a "junction" table that contains both the other primary keys (as foreign keys) and a primary key of its own. I now need to relate another table called "involved vehicles" to the junction table. This relationship is also a many to many. How does one create the relationship with a "junction" table? May a junction table have relationships other than with the 2 initial tables ("people" and "incident") that resulted in its creation? Thanks for your replies. Keep it simple for me, because I am!!!

  2. #2
    Join Date
    Dec 2001
    Location
    USA
    Posts
    13
    I wouldn't add another key to your current 'junction' table that relates the people to the indcident.

    The vehicle is related to the incident, so, create a foreign key from that table to a new table called 'vehicle' and allow a one-to-many join from there. That will allow you to get from the person to the vehicle by going through the incident table.

    Hope that helps,
    Scooter McFly

Posting Permissions

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