Is Your Data Unique? A Refresher on Unique Identifiers

Hunter Ray - GIS Analyst

Introduction

Understanding the differences of ArcGIS unique identifiers and how to create, manage and consume data with unique identifiers is imperative to GIS data management. When working with the tabular GIS data for a feature layer or standalone table in File or Enterprise Geodatabases, GUID (Globally Unique Identifier) values provide the most reliable and truly unique identifier. Global IDs, GUIDs managed by ArcGIS software, are easy to create and manage and provide the best option for common operations like creating relationships. Aside from Global IDs, other options like ObjectID and custom GUID values can offer a degree of uniqueness to data. Let’s dive in and in refresh our memories about identifying our ArcGIS data.

Object Identifiers

The most basic unique identifier in ArcGIS is the ObjectID value. When working with database tables, the ObjectID is automatically created and maintained. ObjectIDs are a required, non-editable attribute for every geodatabase table. Key functionality for ArcGIS is dependent on each value within a table having a unique value. This value does not have to be globally unique, and when investigating ObjectID values among various tables in a database, it’s easy to see how they are structured. In the most general sense, Object ID values start at 1 for row 1 and increment by 1 as rows in the table grow. Thus, every table can have an Object ID of 1, 2, 3, etc. so these are not great options when striving for globally unique identifiers. Appending a row with an Object ID of 1 from one table to another table, will recalculate the Object ID value to the next value in the destination table. Object IDs are also recalculated during an export, most importantly filling in any gaps in values from deleted features. These two reasons are a few of many reasons why identifying and relating data using Object IDs is never advised.

Globally Unique Identifiers

So now that Object IDs have been discussed, enter the king of all unique identifiers – the GUID. These unique values, also known as UUID (Universally Unique Identifier) outside of ArcGIS, are a registry-style string of letters and numbers totaling 36 characters. The 36-character, or 128-bit integer, style of these identifiers means there is almost no chance they will ever be duplicated. It would take somewhere around a quintillion GUID values to have a 50% chance of collision (or duplicate values), which ultimately means giving a table row a GUID value will allow it to remain unique for its entire lifespan. To this point, ArcGIS Online assigns Service Item IDs using GUIDs (see format number 4 below). These values can be formatted a few different ways depending on the software used and the presence/absence of Uppercase letters, curly braces, and hyphens. Below are four different formats of the same GUID value:

  1. {E41C7AAC-D5DD-49EE-A604-FF8C4F88A988}

  2. {e41c7aac-d5dd-49ee-a604-ff8c4f88a988}

  3. E41C7AAC-D5DD-49EE-A604-FF8C4F88A988

  4. e41c7aacd5dd49eea604ff8c4f88a988

Global ID Management

The common GlobalID values referenced in ArcGIS are simply GUID values that are generated and maintained by the ArcGIS software. It should be noted that other GUID fields can be used in ArcGIS. These fields inherently hold the same type of 36-character values as Global IDs, with the exception that GUID field values are maintained by the user, often by using Python in the Field Calculator window to calculate new GUID values. Adding and managing Global ID values in the Global ID field is easily done using the “Add GlobalIDs” geoprocessing tool. When the “Add GlobalIDs” tool is run for a dataset already possessing the GlobalID field, any existing GlobalID value is left unchanged. In the modern ArcGIS world, having GlobalID values on a dataset is required, so it’s best practice to just add Global IDs to any and all of your datasets as you create or modify existing data.

It’s worth noting that some ArcGIS geoprocessing tasks inherently keep Global ID values, while others do not. For example, when using the Append tool in ArcGIS, there is an Environment option allowing users to preserve Global ID values. Another example, when using custom field mapping in the Append tool (or another field mapping process), writing existing Global ID values to a target GUID field allows for the retention of the values. This concept is important when managing attributes of related features using the GlobalID field acting as the origin/primary key and a GUID field acting as the destination/foreign key. For more information on the Arcpy Environment setting for Preserve Global ID’s, visit this page.

Conclusion

When it comes to data management, giving your data the ability to be uniquely identified is a must. When using ArcGIS and most database management systems, Object IDs will be generated and provide a relative level of uniqueness. For data to possess a truly unique identity (remember we mentioned quintillions), GUID (i.e., Global ID’s) are the easiest and best option. The next time you interact with your GIS data, check for Global IDs. If they aren’t there, maybe it is time to add them and make your data truly unique.

Our team stands ready and waiting to help with this or any of your GIS needs. To request a meeting and quote for services, contact us at 877.377.8124, or through our contact page.