Create Relationship Class (Data Management)

This ArcGIS 3.1 documentation has been archived and is no longer updated. Content and links may be outdated. See the latest documentation.

Summary

This tool creates a relationship class to store an association between fields or features in the origin table and the destination table.

Usage

  • Relationships can exist between spatial objects (features in feature classes), nonspatial objects (rows in a table), or spatial and nonspatial objects.

  • Once created, a relationship class cannot be modified; you can only add, delete, or refine its rules.

  • For many-to-many relationship classes, a new table is created in the database to store the foreign keys used to link the origin and destination classes. This table can also have other fields to store attributes of the relationship itself that are not attributed to either the origin or destination class. For example, in a parcel database, you might have a relationship class between parcels and owners in which owners "own" parcels and parcels are "owned by" owners. An attribute of that relationship could be percentage ownership. One-to-one and one-to-many relationship classes can also have attributes; in this case, a table is created to store the relationships.

  • Simple or peer-to-peer relationships involve two or more objects in the database that exist independently of each other. For example, in a railroad network, you might have railroad crossings that have one or more related signal lamps. However, a railroad crossing can exist without a signal lamp, and signal lamps exist on the railroad network where there are no railroad crossings. Simple relationships can have one-to-one, one-to-many, or many-to-many cardinality.

  • A composite relationship is one in which the lifetime of one object controls the lifetime of its related objects. For example, power poles support transformers, and transformers are mounted on poles. Once a pole is deleted, a delete message is propagated to its related transformers, which are deleted from the transformers' feature class. Composite relationships are always one-to-many.

  • Forward and backward path labels describe the relationship when navigating from one object to another. The forward path label describes the relationship navigated from the origin class to the destination class. In the pole-transformer example, a forward path label might be "Poles support transformers." The backward path label describes the relationship navigated from the destination to the origin class. In the pole-transformer example, a backward path label might be"Transformers are mounted on poles."

Parameters

LabelExplanationData Type
Origin Table

The table or feature class that is associated to the destination table.

Table View
Destination Table

The table that is associated to the origin table.

Table View
Output Relationship Class

The relationship class that is created.

Relationship Class
Relationship Type

The type of relationship to create between the origin and destination tables.

  • SimpleA relationship between independent objects (parent to parent). This is the default.
  • CompositeA relationship between dependent objects where the lifetime of one object controls the lifetime of the related object (parent to child).
String
Forward Path Label

A name to uniquely identify the relationship when navigating from the origin table to the destination table.

String
Backward Path label

A name to uniquely identify the relationship when navigating from the destination table to the origin table.

String
Message Direction

The direction in which messages are passed between the origin and destination tables. For example, in a relationship between poles and transformers, when the pole is deleted, it sends a message to its related transformer objects informing them it was deleted.

  • Forward (origin to destination)Messages are passed from the origin to the destination table.
  • Backward (destination to origin)Messages are passed from the destination to the origin table.
  • Both directionsMessages are passed from the origin to the destination table and from the destination to the origin table.
  • None (no messages propagated)No messages passed. This is the default.
String
Cardinality

Determines how many relationships exist between rows or features in the origin and rows or features in the destination table.

  • One to one (1:1)Each row or feature in the origin table can be related to zero or one row or feature in the destination table. This is the default.
  • One to many (1:M)Each row or feature in the origin table can be related to one or several rows or features in the destination table.
  • Many to many (M:N)Several fields or features in the origin table can be related to one or several rows or features in the destination table.
String
Relationship class is attributed

Specifies if the relationship will have attributes.

  • Checked—Indicates the relationship class will have attributes.
  • Unchecked—Indicates the relationship class will not have attributes. This is the default.
Boolean
Origin Primary Key

The field in the origin table, typically the OID field, that links it to the Origin Foreign Key field in the relationship class table.

String
Origin Foreign Key

The field in the relationship class table that links it to the Origin Primary Key field in the origin table.

String
Destination Primary Key
(Optional)

The field in the destination table, typically the OID field, that links it to the Destination Foreign Key field in the relationship class table.

String
Destination Foreign Key
(Optional)

The field in the relationship class table that links it to the Destination Primary Key field in the destination table.

String

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes

Related topics