Attributed relationship classes

An attributed relationship class in a geodatabase has an intermediate table that stores and provides additional information about the relationships between related objects.

In a nonattributed relationship class, the relationship is maintained when values in the primary key field of the origin table directly relate to values in the foreign key field of the destination table. There is no separate table to store the relationship information. This is typically used in one-to-one and one-to-many relationships in which one record in a table can be related to one or multiple records in another table, but not vice versa.

In an attributed relationship class, these attributes are stored in a third intermediate table. This intermediate table contains foreign keys referencing the primary keys of the related tables or feature classes. The intermediate table itself can have additional attributes that provide more information about the relationship. This is particularly useful in many-to-many relationships in which one record in a table can be related to multiple records in another table, and vice versa.

Many-to-many relationship classes

A many-to-many relationship class is used when an object from the origin table relates to multiple destination objects and when one destination object relates to multiple origin objects.

Compared with the other cardinality types, such as one-to-one or one-to-many, in which the origin primary key directly relates to the values from the destination foreign key, many-to-many relationships require the use of an intermediate table to map the associations. As a result, when you create a many-to-many relationship, an intermediate table is automatically created. The intermediate table maps primary key values from the origin to foreign key values from the destination. Each row associates one origin object with one destination object.

Many-to-many relationships require the use of an intermediate table.

When the intermediate table is created, only the fields are generated. ArcGIS does not know which origin objects are associated with which destination objects, so you must manually create the rows in the table.

Relationship class intermediate table attributes

The intermediate table of a many-to-many or attributed relationship class can optionally serve a second purpose—storing attributes of the relationship itself. For example, in a parcel database, you may have a dataset containing parcel information related to a table of owners. An attribute of each relationship could be the percentage of ownership. If you need to store such attributes, you can add them to the intermediate table when you create the attributed relationship class or anytime after.

The intermediate table can store attributes for the relationship itself.

Although not as useful as it is with many-to-many relationships, when you're setting up a one-to-one or one-to-many relationship, you may have the same need to store additional attributes in an intermediate table. If this is the case, you must specify this by checking the box next to the Relationship class is attributed option on the Create Relationship Class tool when you create the relationship so an intermediate table is created for you.

Relationship class is attributed check box on the Create Relationship Class geoprocessing tool

As with many-to-many relationships, the intermediate table of an attributed relationship class maps primary key values from the origin to foreign key values from the destination, allowing you to store any number of attributes for each relation.

Once an attributed relationship class is created, you can add the attributed relationship class to your map. The attributed relationship class will appear as a table that you can open in the Contents pane. Additionally, from the Fields view, you can add and remove user-defined fields in this intermediate table and can populate and edit values in these user-defined fields using the Attribute editor.

Note:

This intermediate table is not recognized as an object class in the geodatabase. As a result, geodatabase behaviors such as attribute rules, domains, subtypes, contingent values, and default values cannot be applied or used with this intermediate table.

Before getting started, see Prepare to create a relationship class to review geodatabase relationship class considerations.

Learn how to create an attributed relationship class

Related topics