Creating Multiple Relationship-Classes Between Two Table/Featureclass

6339
8
04-20-2011 10:58 PM
KeremCelik
New Contributor
Hi,

I have a problem creating multiple relationship-classes. Let me explain the problem with an instance.

I have two table called Person (with attributes OBJECTID(By default field), Name, X, Y, Z) and Friendship (with attributes Person1Id, Person2Id, A, B, C).

I want to create two relationship classes between these two tables called Person_Friendship1_Rel and Person_Friendship2_Rel.

The details for relationship classes :

Person_Friendship1_Rel (Origin Table : Person, Destination Table : Friendship, Composite relation, Forward, 1-M relation, Origin primary key field : OBJECTID, Destination foreign key field : Person1Id)

Person_Friendship2_Rel (Origin Table : Person, Destination Table : Friendship, Composite relation, Forward, 1-M relation, Origin primary key field : OBJECTID, Destination foreign key field : Person2Id)

For these settings I can create first relationship-class (Person_Friendship1_Rel) but after that, I cannot create the second relationship class (Person_Friendship2_Rel). It says : "Failed to create the specified relationship class. The relationship class is incompatible with existing relationship class".

I am not sure if geodatabase support this kind of relationship classes.

Thanks in advance.
Kerem.
0 Kudos
8 Replies
CraigGillgrass
Esri Regular Contributor
This is by design, as a feature class/table cannot participate in multiple composite relationship classes.  Since composite relationship classes control the lifetime of features/rows, having multiples of these causes issues when editing.
0 Kudos
KeremCelik
New Contributor
Thanks for your answer.

You say that I cannot create multiple composite relationship-classes between tables/featureclasses.

But have can I handle the scenario that I explained in the first post? Do you have any suggestions?

Thanks.

Kerem.
0 Kudos
CraigGillgrass
Esri Regular Contributor
Without more specifics on the relationship classes you want to create, I can't really comment on the data model structure.  Your examples, while helpful, don't really demonstrate how you'd like to use the relationship classes.
0 Kudos
kevinjohnson5
New Contributor
Why not create an additional table
0 Kudos
kevinjohnson5
New Contributor
I'm assuming you're working in ArcMap, If so you can add multiple copies of a single table, shapefile, feature class etc.. Why not import "Friendship" and "Person" twice, assigning your unique relates as desired.
0 Kudos
KeremCelik
New Contributor
I'm assuming you're working in ArcMap, If so you can add multiple copies of a single table, shapefile, feature class etc.. Why not import "Friendship" and "Person" twice, assigning your unique relates as desired.


Unfortunately, I am not working in ArcMap, I will use these tables in ArcSDE and create a server application.

Thanks.
Kerem.
0 Kudos
KeremCelik
New Contributor
Without more specifics on the relationship classes you want to create, I can't really comment on the data model structure.  Your examples, while helpful, don't really demonstrate how you'd like to use the relationship classes.


The reason for the usage of relationship classes is the following. Thanks to composite relationship classes, when the source data is deleted, the dependency data is also deleted automatically. In example. When I deleted a person, I want all the Friendship to be deleted automatically. So that I want to create multiple composite relationship classes between them.

Thanks.
Kerem
0 Kudos
PaulBrandt
New Contributor III
Did you get this figured out? It sounds like to me what you have is a Many to Many relationship with attributes from Person back to its self. I don't know if ESRI allows this back to its self type of relationship class, but if it does, I think the relationships would get handled in this scenario.
0 Kudos