I am seeking some guidance on working with many-to-many relationship classes thru the ArcGIS Server Javascript API. I am designing a traffic count data management application. Count data locations are stored in a points layer, and there is a non-spatial table of count requests. My plan was to relate the two with a many-to-many relationship class. Count points can be requested any number of times, and each count request can request new data any any number of pre-existing count locations. A many-to-many relationship class seems like the obvious choice here because it enforces data integrity.
There is a complicated process to relate records thru a many-to-many relationship class in ArcGIS Desktop. I had first tried doing this thru adding rows to the relationship class table, but later found out this is not supported. This leads to two questions as I look to implement this functionality in my web application:
- Will I be able to access a many-to-many relationship class table thru Javascript and edit/delete records using
.applyEdits()?
- Is a many-to-many relationship class really necessary in this case? Or is there a more straightforward way to accomplish the same result?
1 Answer 1
- Yes, you will be able to query and edit related records from Javascript, assuming the Server data has been set up for this of course.
- The pros and cons of actually relating tables will depend a lot on how you plan to use and maintain the data beyond GIS. I recommend reading the Esri article on joining and relating tables before deciding if it's the right solution for you.
Sorry I can't give more specific advice; I'm working through similar scenarios with a client right now and haven't figured out the optimal approach yet either.
Explore related questions
See similar questions with these tags.