What is an objectID?
An objectID is a unique, not null integer column used to uniquely identify rows in tables in a geodatabase. ObjectIDs are limited to 32-bit values, which store a maximum value of 2,147,483,648.
Tables that are created through ArcGIS, or created outside ArcGIS then registered with ArcSDE and the geodatabase, must contain an objectID column that is maintained by the geodatabase. The objectID is used by ArcGIS to do such things as scroll and display selection sets and perform identify operations on features.
Since most ArcGIS Desktop functionality requires the objectID to be unique, caution should be used when working directly with the database so that objectIDs are not duplicated. For example, when creating views with a one-to-many relationship, there is the possibility that objectIDs will be duplicated. This causes inconsistent behavior in ArcGIS Desktop functionality.
There are three ways a qualifying objectID is added to a table:
- A geodatabase-maintained objectID column is automatically added to any table created using ArcGIS.
- You specify a column to be used as the objectID field when you register a table with ArcSDE using the sdetable or sdelayer command. You can designate an existing, qualifying column as the objectID, or specify a name for a new objectID column. If you specify a new column name, ArcSDE adds an integer, not null, unique column with that name to the table. At the same time that you specify the column to use as an objectID, you also specify whether that column is to be maintained by ArcSDE or by you (user maintained). Note:
The geodatabase requires a system-maintained objectID. Therefore, if you are going to also register the table with the geodatabase, you should register the objectID as maintained by ArcSDE. If instead you define a user-maintained objectID, the geodatabase adds a new objectID column when you subsequently register the table with the geodatabase. This new objectID column supersedes the column you specified when you registered the table with ArcSDE. It also changes the data type of your user-defined objectID from an objectID to a long integer.
- If you register a table with the geodatabase that does not have a qualifying column, the geodatabase adds another column to the table that meets the requirements of an objectID. If your table already contains a column that is named objectID, the geodatabase adds a column named OBJECTID_.