Resolving Name Duplication in Parent and Child Entities (Unification)

From ER/Studio Data Architect
Jump to: navigation, search

Go Up to Working with Relationships

The Duplicate Attribute Editor appears when you create or rename primary key attributes or relationships and it duplicates existing attributes or columns in child tables or entities. For example, if you have two entities called Parent and Child where Parent has a primary key called KeyName and Child also has an attribute called KeyName, when you create a relationship from Parent to Child, then the Duplicate Attribute Editor shows and you must decide how to handle the propagated attributes.

Notepad blue icon 2.pngNote: If you want that the Duplicate Attribute Editor launches when the child entity has a foreign key with the same name as the parent entity, select Prompt to Resolve FK Columns on the Application tab of the Options editor. To open Options editor choose Tools > Options.

The following will help you understand how to use the Duplicate Attribute Editor:

Attribute Name Editing Options

Once the Duplicate Attribute Editor appear on the Propagating Attributes to Resolve box select the propagating attribute that you want to resolve then select the way you want to propagate and the choose the action you want to be performed:

  • Replace Native Attribute with propagating Attribute: This option replaces the attribute in the child with the propagated foreign key attribute. If the relationship is deleted from the main model, ER/Studio Data Architect removes the propagated attribute and original native attribute from the child entity.
  • Rolename propagating Attribute: This option allows you to rename the foreign key so that the native attribute in the child entity can still exist with its original name. After propagation, both attributes will exist in the child entity.
  • Change Native Attribute Name to allow propagating Attribute Name: This option allows you to rename the original native attribute in the child entity so that the attribute name from the parent entity can be used for the foreign key. After propagation, both attributes will exist in the child entity.
  • Unify Native Attribute with propagating Attribute: This option unifies the propagating foreign with the native attribute in the child table. If the relationship is later deleted, ER/Studio Data Architect leaves the native child attribute.

Examples of Duplicate Name Resolutions

DIA DUP Original.gif

The following examples illustrate how duplicate names are resolved depending on the options chosen in the Duplicate Attribute Editor.

Replace Native Attribute with Propagating Attribute

If selected, ER/Studio Data Architect replaces the attribute in the child with the propagated foreign key attribute. If the relationship is deleted from the main model, ER/Studio Data Architect removes the propagated attribute and original native attribute from the child entity.

DIA DUP Opt1.gif

Rolename Propagating Attribute

If selected, you can rename the foreign key so that the native attribute in the child entity can still exist with its original name. After propagation, both attributes will exist in the child entity.

  • To resolve the naming conflict, in the Duplication Attribute Editor you can specify the rolename idrolename for the foreign key.

DIA DUP Opt2.gif

Change Native Attribute Name to Allow Propagating Attribute Name

If selected, you can rename the original native attribute in the child entity so that the attribute name from the parent entity can be used for the foreign key.

  • To resolve the foreign key, the new child name is specified as id_change_native.

DIA DUP Opt3.gif

Unify Native Attribute with Propagating Attribute

If selected, ER/Studio Data Architect unifies the propagating foreign with the native attribute in the child table.

  • ER/Studio Data Architect keeps id in the child entity if you delete the relationship.

DIA DUP Opt4.gif

Notepad blue icon 2.pngNote: If you want to being able to change the role name of foreign attribute or columns to the same name as other attributes or columns in the same Entity or Table go to Tools > Options. Then check Allow Unification when Editing Names on the Name Handling tab.

See Also