AnsweredAssumed Answered

Join versus Relate

Question asked by CGSJohnson on Feb 6, 2016
Latest reply on Feb 15, 2016 by CGSJohnson

Good evening.  I am trying to decide between using a join versus a relate in ArcMap.  I understand that a join supports a one-to-one relationship, but it also says it supports a many-to-one relationship, which may be what I need.  Keep reading to help me decide.  I also understand that a relate supports/implies a one-to-many relationship.  That's the theory.  Can you help me apply it?  Here's my situation...


I have a shapefile that I imported into a SQL Server database as a feature class that contains spatial data.


I have another table in the same SQL Server database, which is not a geodatabase, that contains non-spatial data for the locations in the feature class.  This table of non-spatial data has many rows for the same location.  Additionally, it will be updated frequently/outside of my knowledge by some automated process.  Currently, I am joining the non-spatial data to the spatial data in ArcMap.  I realize that I will only get the first match between the two tables, but my front-end, which uses the ArcGIS JS API, sends a rather restrictive query to the map service created from the document in ArcMap, which should only yield one row for each location.  This implementation is working fine for me, but I am just wondering about best practices.  Should i really be using a relate or should I just reverse the order of the join -- join the spatial data to the non-spatial data?  And, in so doing, will I see any improvements in the performance of my map service?  It is not horrible, but I am just wondering, generally/best practices-wise speaking.


Any thoughts/suggestions/help would be appreciated.