Results 1 to 4 of 4
  1. #1
    PrincessApril is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Feb 2020
    Posts
    42

    Best Practice for FKs and indexing property

    For indexing my tables, I'm thinking of setting no duplicates for all the PKs. I'm wondering if it really matters for the FKs, given that they are derived from the PKs, but is there a best practice (no duplicates for good measure?).

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,899
    PK's have to be no duplicates. Setting FK's as no duplicates means a 1-to-1 relationship. This is not a common design. Why would you have 1-to-1 relationships?
    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
    PrincessApril is offline Advanced Beginner
    Windows 10 Access 2016
    Join Date
    Feb 2020
    Posts
    42
    Ah, I see.

    I suppose I should choose Yes (Duplicates OK) to have indexes for all my FKs? Perhaps it's not necessary, but it seems better than not having the index.

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,899
    Yes, that is appropriate.
    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.

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

Similar Threads

  1. Indexing Foreign Keys?
    By skidawgs in forum Access
    Replies: 6
    Last Post: 12-10-2019, 11:52 AM
  2. Indexing question
    By rjensen in forum Access
    Replies: 4
    Last Post: 01-21-2019, 12:10 PM
  3. Replies: 26
    Last Post: 07-16-2015, 09:19 PM
  4. Replies: 9
    Last Post: 04-22-2014, 11:09 AM
  5. Indexing question
    By Helystra in forum Database Design
    Replies: 8
    Last Post: 11-22-2013, 04:24 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