Select to view content in your preferred language

1-1 Relationship not Enforced in Relationship Class?

2566
7
Jump to solution
08-15-2014 08:08 AM
847396730
Frequent Contributor

I made a small test to confirm this, see the attached pic for details.  If I create a one-to-one relationship between a feature class and a related table, I am still able to make multiple related records in the destination table.

How is the 1-1 relationship enforced?  Have I missed a step?

(and PS--there used to be an ArcSDE/geodatabase forum, is this the right place to post this?)

0 Kudos
1 Solution

Accepted Solutions
by Anonymous User
Not applicable

Hi Marianne,

I can confirm it works for a sample dataset in 10.2.2

In the attached screenshots I have parcel polygons related to an owners table in a 1-1 relationship.

Overview: shows the selected parcel, the relationship class and the attributes window. The parcel has three owner records.

Rules: show the relationship rules. Here I have both subtypes in the parcel polygon related to the owners table. The residential subtype is selected.

Validate: shows the error message when the selected feature is validate.

A common mistake is not having anything checked in the destination table for the subtype or layer you want to create the relationship rule for.

Let me know if this helps.

Sean

View solution in original post

0 Kudos
7 Replies
RonaldBeloin
Deactivated User

The editor menu in Map has a Validate Features command that is supposed to catch these rule violations. I don't know why it isn't a tool, and as far as I know is the only way to catch the mismatch.

It's possible simple relationships act differently than composite in this respect.

0 Kudos
847396730
Frequent Contributor

The Validate Features does not catch this error.  A unique index on the child record's foreign key field works, but you cannot version a table with a unique index, and therefore cannot replicate it.  We rely heavily on replication for both our internal and external implementations, so that is a dealbreaker.

I'm hoping there is something I am missing.  What is the point of defining a relationship class as 1-1 if it cannot be enforced?

Thanks for your reply.

0 Kudos
by Anonymous User
Not applicable

Hi Marianne,

The cardinality in a 1-1 relationship wont be enforced (picked up by validate) unless the relationship rules are set.

This was highlighted in the 9.2 help but seems to have been left out in subsequent versions. I'll see about getting that addressed.

0 Kudos
847396730
Frequent Contributor

Thank you for the reply; I didn't know you had to go into the new RelClass' properties and set rules.  Having done that, however, the issue persists and is not picked up by the editing toolbar Validate Features.  Are you able to confirm on your end that it works properly in v10.2.2?  And if so, will you share your rule setting with a screen shot?

Thanks again!

0 Kudos
by Anonymous User
Not applicable

Hi Marianne,

I can confirm it works for a sample dataset in 10.2.2

In the attached screenshots I have parcel polygons related to an owners table in a 1-1 relationship.

Overview: shows the selected parcel, the relationship class and the attributes window. The parcel has three owner records.

Rules: show the relationship rules. Here I have both subtypes in the parcel polygon related to the owners table. The residential subtype is selected.

Validate: shows the error message when the selected feature is validate.

A common mistake is not having anything checked in the destination table for the subtype or layer you want to create the relationship rule for.

Let me know if this helps.

Sean

0 Kudos
847396730
Frequent Contributor

Got it, thanks!  Why the extra step of setting rules when you have already chosen 1-1 in the rel class properties?  What is the practical application?  Enforcing cardinality at the subtype, rather than feature class level?

0 Kudos
by Anonymous User
Not applicable

Glad to hear you got It working.

The extra step is to set or fine tune the rules at the subtype level. I agree its a little odd not to turn them all on by default in a 1-1 relationship.

0 Kudos