I have an SDE geodatabase in which I have an origin feature class with relationship classes to several destination feature classes and tables. When a feature is deleted from the origin table, the foreign keys in the all of the destination feature classes and tables are nullified. This has been annoying for the destination feature classes because the foreign keys have to be reestablished, however, it has resulted in lost data for the destination tables because we have no way to figure out which feature they originally belonged to (because there are no spatial data attached) and this has created serious issues.

Is there a workaround for this or a different setting that I need to consider when setting up my relationship classes?

  • From the point of view of the design of the database, why would you create a foreign key if you want to allow values that do not exist in the referenced table? – Gabriel De Luca Feb 14 '19 at 0:28
  • We do not want this to happen, but sometimes our users (especially now with the on-the-fly editing of ArcGIS Pro) accidentally delete an origin feature - but when they recreate it or we get it back from the default version, the foreign key in the destination table has already been nullified and we cannot reestablish the relationship - and in the case of destination tables, we do not know which records belong to which feature. – mmoore Feb 14 '19 at 16:01
  • Since simple relationship classes set the foreign key to Null when an origin feature is deleted, orphaned objects can exist in the relationship's destination class. [...] In order to identify orphaned destination objects in a simple relationship class, relationship rules must be setup to prevent orphaned destination objects. Once the rules are set up the Validate Features tool will identify any orphaned destination objects. Source: desktop.arcgis.com/en/arcmap/10.3/manage-data/… – Gabriel De Luca Feb 14 '19 at 16:34
  • So I guess you should add a relationship rule so that destination classes do not support zero cardinality. desktop.arcgis.com/en/arcmap/10.3/manage-data/relationships/… – Gabriel De Luca Feb 14 '19 at 17:19
  • I do not have ArcGis, so I can not test the same situation, much less write a correct answer. My previous comments were made based on my known way of avoiding the same inconveniences in SQL and my search in the ArcGis documentation to find the parallelism. If they were enough to solve it, do not hesitate to write your own answer as a future reference for users with the same problem. If not, we will wait for the answer of a user who knows that tool and knows how to configure it correctly. – Gabriel De Luca Feb 17 '19 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.