1 Reply Latest reply on Sep 23, 2011 10:54 AM by philmodjunk

    Foreign Key use



      Foreign Key use


      I've inherited a database with lots of tables. Many of the tables are linked to the main "Projects" table using a relationship such as


      PROJECTS::__kp_Projectsid ---< RELATEDTABLE::_kf_projectsid


      However, I'm seeing a whole lot of _kf_ fields in the Projects table, that reference other tables' ID's, even though there aren't relationships using them. Is there a point to having _kf_ fields if they're not being used in a relationship, even if that table is linked using the __kp_projectsid? Is it some sort of standard practice that I don't remember?

        • 1. Re: Foreign Key use

          Perhaps the original developer had plans for the future?

          There' now real reason to add the fields if they aren't used in a relationship, but check carefully before you delete any fields and make a backup copy first.

          You may have multiple table occurrences for the same table here. the _kf fields may be used in a relationship elsewhere than where you first spotted them. One trick to help analyze them is to use the select tables with same source table" option to highlight all occurrences of the same table. (This is an option for the button right next to the zoom percentage box.) You can even use this tool to color code the occurrences so that all with the same source table are the same unique color...