Results 1 to 3 of 3
  1. #1
    Lakeside is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    2

    Best DB practice to use when main table has two fields that relate to information in separate table


    Limited knowledge of Access. In my main table, I have two fields, one to indicate primaryorigin and the other a secondaryorigin. A contactID number is input for each field for records that matches to a primary key = contactID from a ContactList table (name, address etc.). Example, for record #1, the primary origin might be 3 (George from USA) and the secondary origin might be 50 (Mr. Fields from Canada) and so forth for the rest of the records in the main table. How does one set up a relationship/connection when two fields in one table point to the same ID table (list of contact information)? Possible or better solution? Thanks!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,970
    Include the lookup table twice. Relationship and query builder will assign alias name to the second instance like ContactList_1.

    The alternative is two records in a related dependent table for each record of 'master' table.

    The latter is most normalized structure and would be preferred if you want to allow any number of dependent records.

    It is a balancing act between normalization and ease of data entry/output. "Normalize until hurts, denormalize until it works." Your 2 fields can work. A challenge with this structure would be searching for a contactID that could be in either field but with only 2 fields is not so difficult.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Lakeside is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2019
    Posts
    2
    Thank you for the information/reply. I will keep the quote in mind for future Access endeavors .

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

Similar Threads

  1. Replies: 4
    Last Post: 07-11-2016, 01:11 PM
  2. Replies: 6
    Last Post: 06-24-2016, 06:59 AM
  3. Replies: 3
    Last Post: 03-07-2014, 10:39 AM
  4. Replies: 12
    Last Post: 12-14-2011, 08:04 PM
  5. Replies: 1
    Last Post: 07-25-2009, 05:06 PM

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