Modify a relationship class

The following table summarizes supported operations to modify relationship classes and attributed relationship classes in ArcGIS Pro:

Add fields to a relationship class

When a simple or composite relationship class is created with many-to-many (M:N) cardinality or when an attributed one-to-one (1:1) or one-to-many (1:M) relationship class is created, a new intermediate relationship class table is automatically created. This intermediate table is used to map the associations between the origin and destination objects. The intermediate table contains foreign key fields that are associated with the primary key values from the origin and destination feature classes or tables as well as any additional attributes. Each row in the table associates one origin object with one destination object. When the intermediate table is created, only these fields are generated.

Diagram of a many-to-many relationship class
This is an example of a many-to-many cardinality relationship class diagram. In this example, a facility can host multiple activities and an activity can be performed in more than one facility.

Learn more about attributed relationship classes

Follow these steps to add one or more attribute fields to this intermediate table created for a M:N relationship class and any attributed relationship classes:

  1. In the Catalog pane, a catalog view, or the Contents pane of a catalog view, browse to and expand the geodatabase where the relationship class is stored.
  2. Right-click the relationship class you want to add fields to and click Add To New Map to add the attributed relationship class to a new map.

    In ArcGIS Pro, you can use the fields view to view and manage the fields of an attributed relationship class table.

  3. In the new map, from the Contents pane, right-click the relationship class and choose Data Design > Fields to open the Fields view.

    The Fields view displays the relationship class intermediate table fields in a tabular arrangement.

  4. Click the New Field button on the Fields tab or click the last row in the view that says Click here to add a new field.
  5. Enter a name, alias, and select an option from the Data Type drop-down menu for the new field.
  6. Repeat steps 4 and 5 if you want to add more than one field to the attributed relationship class table.
  7. When you are finished adding fields, to save these new fields, access the Save button Save from one of the following locations:
    • Fields tab—On the Fields tab, in the Manage Edits group, click Save.
      Save button on the Fields tab
    • Fields view—In the Fields view, right-click an edited row and click Save from the context menu.
      Save button on the context menu of an edited row in the Fields view

    Once the new field is saved, only the field names appear in the table. The next step will be to populate these fields. To learn more, see Populate an attributed relationship class table.

Delete a relationship class

You can delete a relationship class from a geodatabase in ArcGIS Pro.

Follow these steps to delete a relationship class:

  1. In the Catalog pane, a catalog view, or the Contents pane of a catalog view, browse to and expand the geodatabase where the relationship class is stored.
  2. Right-click the relationship class you want to delete.
  3. Delete the relationship class using any of the following methods:

    Catalog pane

    • Press the Delete key.
    • Right-click the selected relationship class and click Delete Delete.

    Catalog view or the Contents pane of a catalog view

    • Press the Delete key.
    • Right-click the relationship class and click Delete Delete.
    • On the ribbon, click the Catalog tab. In the Organize group, click Delete Delete.

    The Delete geoprocessing tool may be able to delete relationship classes that cannot be deleted using the other methods listed above.

    Caution:

    When you delete a relationship class from ArcGIS Pro, you are prompted to confirm the deletion. In most cases, the deletion cannot be undone.

  4. On the Delete prompt, click Yes.

    The relationship class is deleted.

Migrate a relationship class

You can migrate an object ID-based relationship class to a global ID-based relationship class using the Migrate Relationship Class geoprocessing tool.

Follow these steps to migrate a relationship class:

  1. In ArcGIS Pro, on the Analysis tab in the Geoprocessing group, click the Tools button Tools.

    The Geoprocessing pane appears.

  2. Search for the Migrate Relationship Class geoprocessing tool in the search box.
  3. Click the Migrate Relationship Class tool in the Geoprocessing pane to open.
    Migrate Relationship Class geoprocessing tool dialog box
  4. For the Input Relationship Class parameter, click the browse button Browse, browse to the geodatabase where the existing object ID-based relationship class resides and click Run.
    Note:

    The existing origin feature class or table that is used in the Input Relationship Class parameter value must be based on the ObjectID field. Additionally, the origin feature class or table and the destination class must have a GlobalID field prior to using this tool.

    The Migrate Relationship Class geoprocessing tool modifies an existing relationship class that is object ID-based to a global ID-based relationship class to comply with runtime geodatabase requirements.

Move a relationship class

You can copy a relationship class from one geodatabase to another geodatabase under Databases in the Catalog pane.

Follow these steps to move a relationship class in ArcGIS Pro:

  1. From the Catalog pane, expand the geodatabase where the relationship class is stored.
  2. Right-click the relationship class you want to move.
  3. Click Copy.
  4. Right-click the geodatabase to which you want to copy the relationship class.
  5. Click Paste.
    Tip:

    To copy a relationship class and all the participating feature classes or tables, copy and paste the relationship class only. This will copy all the participating feature classes or tables in the relationship class.

Rename a relationship class

You can change the name of a relationship class stored in a geodatabase.

To rename a relationship class, complete the following steps from ArcGIS Pro:

  1. From the Catalog pane, expand the geodatabase where the relationship class is stored.
  2. Right-click the relationship class you want to rename.
  3. Click Rename Rename.
  4. Type the new name and press Enter.
    Note:
    • The relationship class name must start with a letter and be unique.
    • While a relationship class can be renamed, the primary key and foreign key fields in the origin and destination class cannot be renamed. To learn more, see Rename fields.

Tip:
If you register either the origin or destination class as versioned in the Catalog pane, both the relationship class and the class to which it is related are also registered as versioned.

Update forward and backward path labels

Forward and backward path labels display on the Attributes and Identify results dialog boxes in ArcGIS Pro and help you navigate between related objects in your relationship class.

  • A forward path label displays when you navigate from the origin to the destination.
  • A backward path label displays when you navigate from the destination to the origin.

You can only update the forward and backward path labels for 1:1 or 1:M nonattributed relationship classes.

To update the forward and backward path labels for 1:1 or 1:M nonattributed relationship classes, complete the following steps:

  1. In the Catalog pane, in the Databases folder, click the geodatabase connection to expand its contents.
  2. Right-click the relationship class and select Properties.
    Relationship class displayed in the Catalog pane

    The Relationship Class Properties dialog box appears and the Forward Path Label and Backward Path Label are displayed.

    Forward Path Label and Backward Path Label displayed on the Relationship Class Properties dialog box
  3. Complete the following updates:
    • Next to Forward Path Label, update the path label that you want displayed on the Attributes and Pop-up dialog boxes to make it easier when navigating related data from the origin to the destination class.
    • Next to Backward Path Label, update the path label that you want displayed on the Attributes and Pop-up dialog boxes to make it easier when navigating related data from the destination to the origin class.

    The following example displays updated names for Forward Path Label and Backward Path Label.

    Updated Forward Path Label and Backward Path Label names displayed on the Relationship Class Properties dialog box

  4. After updating the Forward Path Label and Backward Path Label names, click OK on the Relationship Class Properties dialog box.

    The updated Forward Path Label and Backward Path Label names display on the Attributes dialog box and are helpful when navigating the relationship between related objects, such as from Parcel - To_Building(s) (1:M), and from Building - To_Parcel (1:1).

    Updated Forward Path Label and Backward Path Label names are displayed on the Attributes dialog box.

Related topics