Limiting the propagation of Foreign Keys

  • davism

    davism - 2008-04-03

    I could easily be missing something, but I can't seem to find a way to limit the propagation of foreign keys.  I have three tables, lets call them A, B, and C with the default primary keys idA, idB and idC.  If I create 1:n relations from A to B and then from B to C.  I get foreign key creation in C of B_idB and B_A_idA.  However, I know I never want to search C using idA, so I would like to eliminate this unnecessary foreign key.  Trying to delete the key from table C warns that the key will be automatically regenerated, and sure enough it is.  I also just tried blanking out the Dest. Name in the Relation Editor, but that doesn't do anything.

    So, is there a way to do this?

    What would seem to be the right approach would be for the Relation Editor to have a checkbox for each row in the Foreign Keys section to indicate whether the given key needs to be propagated or not.

    • Valdeva Crema

      Valdeva Crema - 2008-04-07

      It sounds like what you want here is non-identifying relationships instead of identifying ones.  This will remove this issue of automatic key propagation.    

      • davism

        davism - 2008-04-07

        Thanks that is exactly the point I was missing.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks