Attachment cardinality – linking a file to multiple features

654
3
06-28-2023 04:38 AM
Status: Open
Labels (1)
GKing
by
New Contributor II

Current file attachment functionality is based on a 1:M relationship cardinality (a feature can have multiple attachments, but an attached file can only be linked to one feature).  In a previous project I had to attach a file to multiple features.  This meant storing the file multiple times in the geodatabase (once for each feature the file needed to be attached to), which is an inefficient method of managing attachments in a geodatabase.

An idea for more efficient management of attachments is to have functionality to use M:N cardinality when attaching files to features in a geodatabase.  This means:

  • A single feature can still have multiple files attached/linked to it.
  • A single stored file can be linked to multiple features in a geodatabase.

Managing file attachments in this way would involve a 2-step process.  Firstly, the file needs to be uploaded/attached into the geodatabase.  Then a second step will be needed to determine which feature(s) the file is attached/linked to.

3 Comments
MarceloMarques

If you create a Geodatabase Relationship Class M:N between the Featureclass(es) and the "Attachments Table" then you shall be able to accomplish what you are describing, you need to implement a normalized data model, with primary keys and foreign keys, to store your data more efficiently.

GKing
by

Thanks for the reply Marcelo.

With the attachment tools in ArcGIS Pro (or other apps), how would users populate the M:N relationship class to define which file is attached to each feature?  I know this can be done by directly accessing/editing the M:N relationship table in ArcGIS Pro.  But getting access to this table will likely be limited to a small number of users in an organisation (GIS admins or the core GIS team).  This option won’t be feasible for a wider GIS user base.

My thoughts with this idea are to potentially provide the front-end functionality to allow users to manage the links between files and features in the M:N relationship table (as well as the database schema updates mentioned previously).

MarceloMarques

@GKing - please read below documentation and article about Many to Many Relationships, these shall answer all your questions.

Relationship class properties—ArcGIS Pro | Documentation

Explore a many-to-many relationship class (esri.com)