Results 1 to 4 of 4
  1. #1
    elicoten is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2009
    Posts
    2

    Question Join three or more tables in many to many link

    (Bold is table names)


    I have a database containing details of establishments, which have branches. The database also stores contact details. The complication is that there is a many to many link between contacts to both branches and establishments. That is, both Establishments and Branches can have Contacts,and there must be a many to many link between these tables.

    A similar example, but involving four tables in the same database concerns Enquiries/Questions. The system also stores details of Products, as well as Certification Authorities who certify Products as well as Policies, which are separate. The system can accept questions which relate to any combination of Certification Authorities, Products and Policies, so I need a many to many link between Questions and any combination of Products, Policies and Certification Authorities

    My question is, what is the best way to deal with such a setup? I already have tried something which seems to work but I'd like to see what the best/correct way to do this is.

    Thanks for your advice,

    Eli

  2. #2
    NassauBob's Avatar
    NassauBob is offline Not THAT Green
    Windows XP Access 2003
    Join Date
    Feb 2010
    Location
    Augusta, GA
    Posts
    61
    You are headed for trouble with many-to-many relationships, my friend. I'd suggest a small table which would instead have one-to-many relationships to the others, instead.

    For every Establishment, there are 1 or more Branches, right? So do a one-to-many for that relationship.

    And if you relate Contact to Establishment, rather than to Branch, then the relationship is the same: For each Establishment, there are one or more Contacts.

    Maybe like this?:

    Contact >------ Establishment ------< Branch, with EstabID common in all tables?


    Would that work?

  3. #3
    elicoten is offline Novice
    Windows Vista Access 2007
    Join Date
    Oct 2009
    Posts
    2
    Yeah, that will work and that is what I've done, but what about the fact that Branches also have Contacts?

    Contacts link to both Branches and Establishments in addition to the fact that Establishments have Branches, so what's missing from that diagram is the fact that Branches have Contacts.

    Thanks very much for your assistance.

  4. #4
    NassauBob's Avatar
    NassauBob is offline Not THAT Green
    Windows XP Access 2003
    Join Date
    Feb 2010
    Location
    Augusta, GA
    Posts
    61
    True, but can not a Contact be directly related to Establishments, and indirectly (through Establishment) related to Branches?

    Am I interpreting your situation correctly?

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

Similar Threads

  1. Replies: 3
    Last Post: 08-06-2009, 11:49 PM
  2. Best way to link tables together?
    By marleyuk in forum Access
    Replies: 1
    Last Post: 06-07-2009, 08:44 AM
  3. Self Join in a Table
    By LornaM in forum Database Design
    Replies: 10
    Last Post: 05-06-2009, 10:29 AM
  4. Link tables on "special" fields
    By Gargen in forum Access
    Replies: 0
    Last Post: 12-18-2008, 12:02 PM
  5. Unable to import or link tables through odbc in Access SP2
    By Dave Jenkins in forum Import/Export Data
    Replies: 3
    Last Post: 11-09-2005, 11:51 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