Select to view content in your preferred language

Primary Key Alternatives

02-27-2018 07:20 AM
New Contributor III

This subject has been discussed in many posts before but my intention is to discuss use cases and what kind of solutions has been developed.

Integration of ArcGIS with a third party application. There seem to be four alternatives for "primary key" to set up a relation without creating relationship classes. OBJECTID, GLOBALID, GUID and an integer field.

The least stable is OBJECTID. As it's pretty hard to preserve the values. And also it's not suggested in the technical documents.1

The second option is GLOBALID which is suggested by Esri and seems to be most used.2 However, there are some possibilities of change on GLOBALID values.3 Besides, in an ArcGIS blog post, it's not recommended to use them as unique identifiers.4 I know that this post is a bit old but, I couldn't find any newer information to replace it.

GUID seems to be the strongest option as they never change in any data transfer scenario. Plus, this option is suggested in the same blog post for unique identifiers. What we need to do is create a structure of sequence-triggers to generate the values. This option is also suggested in Alternative to ObjectID as Primary Key for Related Tables by Vince Angelo. As he mentioned GUID's can cause performance issues on joins.

So here comes the latest option. Creating an integer field. If I'm going to create sequences and triggers what GUID type will provide me rather than an integer type?

1: “No, it is not recommended to use ObjectIDs when joining a table in ArcMap.” 

2: " Developers can use them in relationships or in any application requiring globally unique identifiers." - 


4: "This should not be used for a Unique ID. These values can change if you have to reload the data at some point or if you drop the Global ID field and re-add it. " 

0 Replies