Toad World® Forums

Assigning Relationships


#1

Maybe I am missing something here, but…

I am attempting to set up FK relationships among my tables. I can set them up, via the macro, and also via dragging and dropping in the relationship lines. However, I am not able to remove those relationships from the tables, or otherwise alter or edit them. I can go into the relationship and change the child column, and I can see the tables listed there as well. Within the entities, I can see the relationships, but I cannot edit them.

What I can’t seem to be able to do is to actually change the relationship. I know I used to be able to do this. I remember it being complicated an unintuitive, but I could edit it. Now, I don’t seem to be able to edit relationships at all. If I make a mistake, I have to delete the relationship and recreate it - and hope I get it right that time.


#2

Hi,

I am not sure what you wish to modify. In general:

  1. If you wish to change parent attribute or key items, edit it in the parent entity and the change will be propagated to child table/attribute.

  2. If you wish to change key used for the relationship, change value in the Parent Key combo box on Relationship Properties.

  3. If you wish to change mappings between parent and child attributes (e.g. use existing attribute in child entity instead of “migrated” attribute, change it via the Child item on Relationship Properties dialog.

In settings you can affect Attribute Properties Propagation value and choose if all PK properties should migrate to children or only Obligatory properties.

Re improvements: In previous versions it was not possible to delete relationships from Entity properties window. In the latest BETA version this is possible. You can delete FK attributes and the relationship will be deleted as well.

Regards,

Vaclav


#3

Hi,

I am not sure what you wish to modify. In general:

  1. If you wish to change parent attribute or key items, edit it in the parent entity and the change will be propagated to child table/attribute.

  2. If you wish to change key used for the relationship, change value in the Parent Key combo box on Relationship Properties.

  3. If you wish to change mappings between parent and child attributes (e.g. use existing attribute in child entity instead of “migrated” attribute, change it via the Child item on Relationship Properties dialog.

In settings you can affect Attribute Properties Propagation value and choose if all PK properties should migrate to children or only Obligatory properties.

Re improvements: In previous versions it was not possible to delete relationships from Entity properties window. In the latest BETA version this is possible. You can delete FK attributes and the relationship will be deleted as well.

Regards,

Vaclav


#4

Hi,

I am not sure what you wish to modify. In general:

  1. If you wish to change parent attribute or key items, edit it in the parent entity and the change will be propagated to child table/attribute.

  2. If you wish to change key used for the relationship, change value in the Parent Key combo box on Relationship Properties.

  3. If you wish to change mappings between parent and child attributes (e.g. use existing attribute in child entity instead of “migrated” attribute, change it via the Child item on Relationship Properties dialog.

In settings you can affect Attribute Properties Propagation value and choose if all PK properties should migrate to children or only Obligatory properties.

Re improvements: In previous versions it was not possible to delete relationships from Entity properties window. In the latest BETA version this is possible. You can delete FK attributes and the relationship will be deleted as well.

Regards,

Vaclav


#5

Vaclav,
Thank you for your reply. Here is the scenario that has arisen a few times this week:
I am diagramming a model of a DB I am architecting. In the process of doing so, I realize that I left something out, or the data for an item is actually better stored somewhere else. In short, the parent table, or the child table, is not longer correct. I cannot seem to alter this at all. Also, the magical Infer Relationships macro doesn’t always infer correctly (usually because I messed something up), and so I want to change it. I can (and have) changed the child column, but I can’t change the parent table. I can change the parent key, but not the table.

Speaking of the Infer Relationships macro, it works about 80% of the time. The rest of the time, it just doesn’t do anything. If I then drag and drop a relationship line between the two tables, the relationship is correctly established. So, it’s not because it can’t figure out what to do from the column names. This is a minor nuisance.

Having the other macro, that is currently offered for download (somewhere), the one that lets me auto-add existing relationships to entities on a new workspace, should be part of the standard build, in my opinion.


#6

Hi,

thank you for your feedback.

Re changes in your model: in some situations there can be no better method than creation of new relationship between two tables. If you want to change parent table, the only way how to do it is by dragging the connection point of relationship from the old parent to the new parent. But I recommend you to create new relationship from parent to child.

The infer relationship macro - it was improved and works better in the latest BETA version. The version that is avaialble in commercial version is not perfect.

And yes, the macro to add existing relationship should appear in next commercial version. Modification of the Workspace members form is in progress.

Thanks again,

Vaclav