![]() The Zone table contains the descriptions for the various zoning codes and is conceptually similar to a lookup table. The following example illustrates how this can occur: ![]() If you choose the wrong class as the origin and delete objects in the origin, you will introduce errors into the foreign key field. This is because when you delete a record in the origin class, the simple relationship class finds the matching records in the destination class and sets the value of their key fields to Null. In simple relationships, getting this correct is critical. With the behavior of cascade deletes in composite relationships, the importance of this may seem obvious. When you create a relationship class, you choose one class to be the origin and another to be the destination. ![]() In a composite relationship, destination objects can't exist independently of origin objects, so when the origin is deleted, the related destination objects are also deleted in a process called a cascade delete.Ī composite relationship can also help you maintain features spatially moving or rotating an origin feature causes the related destination features to move or rotate with it when messaging is set to Forward.Ĭomposite relationships are always one-to-many when you create them but can be constrained to be one-to-one with relationship rules. Like simple relationships, composite relationships also maintain referential integrity when objects are deleted, but they do so in a different way. Simple relationships can have one-to-one, one-to-many, or many-to-many cardinality. If you want to relate the same destination feature to a new or different origin feature in the future, the FK field can be updated from Null to the new FK value.ĭeleting a destination object has no effect on the primary key value in the related origin object. If there is no origin feature with the matching primary key value, then there is no reason to maintain the foreign key value. The sole purpose of the foreign key is to maintain a relationship between the destination object and the related origin object. If the origin feature is deleted, then the value in the foreign key is no longer relating that row to a feature in the origin and, as a result, the foreign key value is no longer required and is set to Null. ![]() This foreign key behavior was designed to maintain referential integrity between features. When you delete an origin object in a simple relationship, the foreign key field value for the matching destination object is set to Null. However, a railroad crossing can exist without a signal lamp, and signal lamps exist on the railroad network where there are no railroad crossings. For example, in a railroad network, you may have railroad crossings that have one or more related signal lamps. In a simple relationship, related objects can exist independently of each other. When you create a relationship class, you specify whether it is simple or composite. Once you've created the relationship, you can specify rules to refine the cardinality. Forward and backward labels that display when you navigate related records in ArcMap.Whether you want to store attributes for each relation.Message notification direction, applicable if you want to implement custom cascade update or delete behavior.Cardinality: Is the relationship one-to-one, one-to-many, or many-to-many?.You specify these properties when you create the relationship class. Available with Standard or Advanced license.Ī relationship class contains several properties that define how objects in the origin relate to objects in the destination.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |