Select to view content in your preferred language

Relationship class questions

163
2
07-09-2025 02:46 PM
matchjohn
New Contributor

I am working to create a database and I need help figuring out the correct type of relationship classes to make. 

 

I am tracking activity of ships. I have a point feature class of ports, a table of ship names, and I was hoping to create a table of activities ( unload, load up, cargo type ect) of these ships. 

 

My original thought was to create a one to many between the ports and ships, then another one to many between the ships and activities. 

 

But this results in duplicate ship records in the ship table. 

 

Is this solvable with a many to many between the ports and ships maybe? 

 

Thanks for any feedback

0 Kudos
2 Replies
MobiusSnake
MVP Regular Contributor

What is the relationship between ports and ships?

  • Does a ship have a "home" port it should be linked to?
    • If so, you could do this with a 1:M relationship class between ports (origin) and ships (destination).
  • Should a ship be linked to every port it's ever been to?
    • If so, you could do this with a M:M relationship class (origin and destination doesn't matter so much here).
  • Should a ship be linked to every port it's ever been to, but with dates of arrival and departure?
    • If so, you could do this with a M:M relationship class, with attribution on the relationship class.

An attributed relationship class could also be an option for associating activities with a port/ship pairing.  If it had dates in there, you could even have activities associated with each visit.

Another consideration is how this will be used downstream.  For example, will this be used in Pro exclusively?  Will it be used with mobile or web applications in ArcGIS Online?  That kind of thing is important to consider because M:M relationships and attributed relationships may not do what you need in those contexts, support for them isn't as good as it is for simple 1:1/1:M relationships in my experience.

0 Kudos
AyanPalit
Esri Regular Contributor

@matchjohn The modelling can be simplified : does ships have to be related to ports? what is the use case? what will you gain from this? perhaps eliminate this relationship; port at which ship is docked can be a domain list. one to many between the ships and activities makes sense.

Great suggestions  from @MobiusSnake . agree that M:M relationship maintenance has some overhead.  

Ayan Palit | Principal Consultant Esri
0 Kudos