Relationship Class

3055
10
09-10-2015 06:53 AM
Highlighted
New Contributor

Hello,

As a part of an urban transformation project, I am obliged to create a M-N relationship between the buildings and the exchange table based

based on Analysis Number.

For 1-1 joins the table and the geometry works fine, yet shows only the first record of the table. The data is visible via Identify Tool.

Relate does not work for me because then I cannot reach the data via Identify.

So I tried to create a relationship class between these two entities. The class is completed without any mistakes, however the Identify Tool returns empty. I tried field types of text short integer and double, but no result. I am attaching the files to the post.

Any help will be appreciated.

Thank you.

Tags (1)
Reply
0 Kudos
10 Replies
Highlighted
Esri Esteemed Contributor

Hi Seckin,

What fields are you using to create the relationship class?

Reply
0 Kudos
Highlighted
New Contributor

Hi Jake,

Sorry I forgot to mention, it is Analysis Numbers (ANALIZNO).

Thank you.

Reply
0 Kudos
Highlighted
Esri Esteemed Contributor

This field exists in the Excel table, but doesn't appear to exist in the shapefile.

Reply
0 Kudos
Highlighted
New Contributor

In shape file it is Text

Reply
0 Kudos
Highlighted
Esri Contributor

Hello,

When you create a relationship class with M-N cardinality, a join table is automatically created as part of the relationship class. The join table will have two columns - the unique key from ICMAL and the unique key from ZEMINKAT. The join table acts as an intermediary between ICMAL and ZEMINKAT linking the records via their unique IDs.

This is where it gets challenging. Because a record in ICMAL can link to zero or more records in ZEMINKAT, and each record in ZEMINKAT can link to zero or more records in ICMAL, ArcGIS does not know how to link records from one object to the other. This means the join table is empty. What you have to do is identify for each unique ID in ICMAL the corresponding unique IDs in ZEMINKAT, and for each unique ID in ZEMINKAT the corresponding unique IDs in ICMAL. This information is used to populate the join table.

These two articles provide methods for populating the join table:

Regards,

Rudy

Highlighted
New Contributor

Hello Rudy,

Thank you for the answer. Yet I have another one.

You said "What you have to do is identify for each unique ID in ICMAL the corresponding unique IDs in ZEMINKAT, and for each unique ID in ZEMINKAT the corresponding unique IDs in ICMAL. This information is used to populate the join table." I think it will take forever but I can do this, but how?

Is it more if I ask for further help?

Thank you.

Reply
0 Kudos
Highlighted
New Contributor

And another question: do I have a restriction for the type of the field to be used in order to establish relationship classes? Like; they have to be float type, etc.

Thanks

Reply
0 Kudos
Highlighted
Esri Contributor

Seckin

Apologies for the late reply. I got distracted.

Answer to your second question: There's no restriction on the field type used to establish the relationship. Because both tables have to be registered with the geodatabase in order to create a relationship class, many people use the ObjectID field as the unique ID.

Answer to your first question: How to populate the join table is always a challenge. The GeoNet thread Populating a many-to-many relationship class ​provides a code example. A second method is to create a CSV file with the necessary information and use Append to load it into the join table. You can add the join table to your map by dragging the relationship class into the map.

I noticed in your data that RefName_1 and Text in ZEMINKAT are the same, and they appear to link to ANALIZ_No in ICMAL. It appears you could dissolve the data on RefName_1 and use an ArcMap Relate to link it to ICMAL.

Regards,

Rudy

Highlighted
MVP Esteemed Contributor

Rudy, I don't think you link is working....​  what it is trying to go to  https://community.esri.com/external-link.jspa?url=http%3A%2F%2Fthread%2F

Reply
0 Kudos