Results 1 to 3 of 3
  1. #1
    gwboolean is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    65

    Best approach

    I have two tables. One is a vendor table and the other is a part table. Each record in each of the tables is identified by a unique 9 digit part number (both tables derive their part numbers from the same source). So each part can have one or more vendors (source). Each vendor can be used in one or more part. I am want to have a relation between these two tables. I would like to know what is the best practice for relating records in the two tables that can be many-to-many.



    What I have done is created a third table that contains two fields. Field one holds part numbers for parts and field two holds part numbers for vendors. The relationships can be seen below (barely):

    Click image for larger version. 

Name:	relationships.jpg 
Views:	16 
Size:	37.9 KB 
ID:	30170

    Is this the best way to deal with two tables that can be related many-to-many or is there a better approach that I should take? My database is contained as a dataset in a Visual Basic application. There is no issue that I can find in doing this, but I would like to know what is the best practice.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,642
    That's what I'd do. It's often called a junction table.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    gwboolean is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2012
    Posts
    65
    Thanks, sounds good to me.

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

Similar Threads

  1. Need direction on best approach
    By mrcarter in forum Queries
    Replies: 8
    Last Post: 01-23-2014, 06:05 PM
  2. Is DLookup the Best Approach for This?
    By Tim777 in forum Access
    Replies: 6
    Last Post: 11-20-2012, 01:25 PM
  3. Best Approach to learn VBA
    By Richie27 in forum Access
    Replies: 3
    Last Post: 06-16-2012, 01:33 PM
  4. Looking for an alternative approach to my mdb design
    By Chuck55 in forum Database Design
    Replies: 4
    Last Post: 05-23-2012, 05:54 PM
  5. Not sure how to approach this problem
    By Jasrenkai in forum Access
    Replies: 2
    Last Post: 02-28-2011, 05:23 PM

Tags for this Thread

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