When a relationship class is created with many-to-many cardinality or with attributes, an intermediate relationship class table is created. This 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 and/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 the fields are generated for you. ArcGIS does not know which origin objects are associated with which destination objects, so you must manually populate the rows. This can be accomplished in an ArcMap edit session by selecting related features or rows in the two participating object classes and adding the relationship to the intermediate table via the Attributes dialog box located on the Editor toolbar. Once a relationship has been added to the intermediate table, the foreign key fields will be automatically populated with the related primary key values, and data can be entered in any additional attribute fields. This process must be repeated for all the sets of related features.
- Create the relationship class in ArcCatalog or the Catalog window with the Relationship Class Wizard or the Create Relationship Class tool located in the Data Management Toolbox.
- Open ArcMap and add the feature classes and/or tables that are participating in the relationship along with the intermediate relationship class table.
- Start an edit session by clicking Editor > Start Editing.
- Interactively select related origin and destination objects using the Edit tool. If a table is participating in the relationship, open the table and select the desired rows.
- Open the Attribute dialog box by clicking the Attributes button on the Editor toolbar. The selected features will appear in the left panel of the Attribute dialog box.
- Expand one of the selected feature classes in the left panel and right-click the relationship class label.
- Click the Add Selected option. This will add a row to the intermediate table and populate the foreign key fields with the related primary key values.
- Repeat steps 4 through 7 to populate the relationship class table with all the appropriate relationships between objects.
- Open the relationship class table to view the updated relationships and to input or edit data in the attribute fields.
- You must save your edits to save the relationships and the new data in the intermediate relationship class table.