Menu

foreign keys inherited

Help
thoniel
2009-02-18
2013-03-06
  • thoniel

    thoniel - 2009-02-18

    hi
    i have a lot of relations in my model so i use a lot of foreign keys.
    now i have the following problem:

    table A has an ID and a FK to table 0. Table B now has a FK to table A.

    Table 0
    - ID

    Table A
    - ID
    - FK Table 0

    Table B
    - ID
    - FK Table A
    ------------
    thats how i want it. but dbdesigner inherits the FK to Table 0 from table A in Table B.

    Table 0
    - ID

    Table A
    - ID
    - FK Table 0

    Table B
    - ID
    - FK Table A
    - FK Table 0

    i cant delete the column in table b as dbdesigner puts it back in.

    in mysql workbench i can delete it. but that tool is very slow and on linux i dont see the edges of the relations. so i would like to use dbdesigner.

     
    • Andrew Howell

      Andrew Howell - 2009-02-18

      It sounds as if you need to be making non-identifying relations.
      You can edit existing relations by double-clicking the line joining the tables and changing the "Relation Kind"

      Or to create new ones, use the buttons in the toolbar with the dotted relation icons (the 2 buttons immediately under the table button)

      Possibly you need to edit the foreign key destination in the relation editor - does this picture look something like you want to achieve?

      http://www.rowan.nildram.co.uk/tmp/dbdesignerrelation.png

      HTH

       
    • thoniel

      thoniel - 2009-02-18

      well yeah.. thank you. i tried that but it didnt work in my model. i guess there were to many side-effects involved by other relations.

       

Log in to post a comment.