<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Relationships in ArcGIS Offline Applications in Developers Questions</title>
    <link>https://community.esri.com/t5/developers-questions/relationships-in-arcgis-offline-applications/m-p/57824#M316</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;I'm seeing a problem in one of my projects and I think presenting a scenario is the best way to ask the question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have an enterprise GDB sitting on MS SQL Server. I have a project that has a strict requirement of maintaining unique integer values to identify each feature. These numbers have a specific starting (seed) number that is equal to the last known value + 1. Let's call this unique ID field LAYER_ID. Since this relationship exists in an enterprise geodatabase, I must use one of esri's relationship classes to keep track of this. This layer needs to be prepared for offline use (syncing and editing though esri's .net SDK) so I must enable archiving and add global id's. When I enable archiving, the underlying MS SQL DBMS primary key fields are automatically changed and move&amp;nbsp;the primary key field to GDB_ARCHIVE_OID. This is not&amp;nbsp;that big of deal since the LAYER_ID field still exists and can be managed by the relationship class instead of the underlying DBMS. However, one of the&amp;nbsp;requirements of offline data preparation reads as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/396554_pastedImage_1.png" style="width: 620px; height: 111px;" /&gt;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A class="link-titled" href="https://enterprise.arcgis.com/en/server/10.5/publish-services/windows/prepare-data-for-offline-use.htm#ESRI_SECTION2_FEA994E249BF40E68663ABFAF6137E7E" title="https://enterprise.arcgis.com/en/server/10.5/publish-services/windows/prepare-data-for-offline-use.htm#ESRI_SECTION2_FEA994E249BF40E68663ABFAF6137E7E"&gt;Prepare data for offline use—Documentation | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the issue I am facing - the documentation states that in order to take data offline, the relationship class must use either the Global ID column or a user-managed field as the primary key. In my scenario I can't use a Global-ID field for the relationship since the previously used LAYER_ID needs to be of a specific format (starting seed). This would mean I need to have the relationship class set up on a user-managed field as the primary key. Does esri have any samples of how it recommends going about doing this? It seems that the Global-ID field is used to track individual features in esri's distribution framework, meaning that if two users have offline copies of the same database, and both add a new feature, the Global-ID is set up so that they both still increment with unique Gloabl-IDs, which means that all feature are still uniquely identified. If I use a different "user-managed" field for my relationship class (as would be required by my project constrain of utilizing prior LAYER_IDs) how would I be expected to mange this unique ID across multiple offline copies of the database? It appears that esri's enterprise GDB table structure of triggers and stored procedures manages&amp;nbsp;groups of unique Global-IDs that get included when the database gets taken offline (using create replica from the server or SDK). I know that MS SQL Server's native (non-esri) functionality has a replication mechanism that will create a set of id's that gets distributed for each offline copy and is managed by their replication merge system. Since esri appears to&amp;nbsp;have built it's own, non-native-to-the-DMBS&amp;nbsp;way of doing things&amp;nbsp;and instead built the Global-ID management into the GDB table structure, is there a way that esri recommends this situation be handled? Again, since archiving has to be enabled for this scenario, the underlying DBMS primary key cannot be set on my LAYER_ID field and is automatically changed to the GDB_ARCHIVE_OID field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With these requirements from esri on the GDB distribution pattern, it appears there is no way to enforce relational unique IDs on a non Global-ID field in a sync enabled, editable offline geodatabase. Any ideas on how to get around this problem?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any insights you can provide.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 Feb 2018 21:27:42 GMT</pubDate>
    <dc:creator>BradleyAndrick3</dc:creator>
    <dc:date>2018-02-13T21:27:42Z</dc:date>
    <item>
      <title>Relationships in ArcGIS Offline Applications</title>
      <link>https://community.esri.com/t5/developers-questions/relationships-in-arcgis-offline-applications/m-p/57824#M316</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;STRONG&gt;I'm seeing a problem in one of my projects and I think presenting a scenario is the best way to ask the question:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Suppose I have an enterprise GDB sitting on MS SQL Server. I have a project that has a strict requirement of maintaining unique integer values to identify each feature. These numbers have a specific starting (seed) number that is equal to the last known value + 1. Let's call this unique ID field LAYER_ID. Since this relationship exists in an enterprise geodatabase, I must use one of esri's relationship classes to keep track of this. This layer needs to be prepared for offline use (syncing and editing though esri's .net SDK) so I must enable archiving and add global id's. When I enable archiving, the underlying MS SQL DBMS primary key fields are automatically changed and move&amp;nbsp;the primary key field to GDB_ARCHIVE_OID. This is not&amp;nbsp;that big of deal since the LAYER_ID field still exists and can be managed by the relationship class instead of the underlying DBMS. However, one of the&amp;nbsp;requirements of offline data preparation reads as follows:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/396554_pastedImage_1.png" style="width: 620px; height: 111px;" /&gt;&lt;/P&gt;&lt;P&gt;Source:&amp;nbsp;&lt;A class="link-titled" href="https://enterprise.arcgis.com/en/server/10.5/publish-services/windows/prepare-data-for-offline-use.htm#ESRI_SECTION2_FEA994E249BF40E68663ABFAF6137E7E" title="https://enterprise.arcgis.com/en/server/10.5/publish-services/windows/prepare-data-for-offline-use.htm#ESRI_SECTION2_FEA994E249BF40E68663ABFAF6137E7E"&gt;Prepare data for offline use—Documentation | ArcGIS Enterprise&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is the issue I am facing - the documentation states that in order to take data offline, the relationship class must use either the Global ID column or a user-managed field as the primary key. In my scenario I can't use a Global-ID field for the relationship since the previously used LAYER_ID needs to be of a specific format (starting seed). This would mean I need to have the relationship class set up on a user-managed field as the primary key. Does esri have any samples of how it recommends going about doing this? It seems that the Global-ID field is used to track individual features in esri's distribution framework, meaning that if two users have offline copies of the same database, and both add a new feature, the Global-ID is set up so that they both still increment with unique Gloabl-IDs, which means that all feature are still uniquely identified. If I use a different "user-managed" field for my relationship class (as would be required by my project constrain of utilizing prior LAYER_IDs) how would I be expected to mange this unique ID across multiple offline copies of the database? It appears that esri's enterprise GDB table structure of triggers and stored procedures manages&amp;nbsp;groups of unique Global-IDs that get included when the database gets taken offline (using create replica from the server or SDK). I know that MS SQL Server's native (non-esri) functionality has a replication mechanism that will create a set of id's that gets distributed for each offline copy and is managed by their replication merge system. Since esri appears to&amp;nbsp;have built it's own, non-native-to-the-DMBS&amp;nbsp;way of doing things&amp;nbsp;and instead built the Global-ID management into the GDB table structure, is there a way that esri recommends this situation be handled? Again, since archiving has to be enabled for this scenario, the underlying DBMS primary key cannot be set on my LAYER_ID field and is automatically changed to the GDB_ARCHIVE_OID field.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;With these requirements from esri on the GDB distribution pattern, it appears there is no way to enforce relational unique IDs on a non Global-ID field in a sync enabled, editable offline geodatabase. Any ideas on how to get around this problem?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any insights you can provide.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Feb 2018 21:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/developers-questions/relationships-in-arcgis-offline-applications/m-p/57824#M316</guid>
      <dc:creator>BradleyAndrick3</dc:creator>
      <dc:date>2018-02-13T21:27:42Z</dc:date>
    </item>
  </channel>
</rss>

