When creating standalone tables in a geodatabase, what are the requirements for the OID/FID/ObjectID field name? Specifically, does it have to be named 'ObjectID'?
I was under the assumption that row id columns (thanks for the correct nomenclature Vince) MUST be named FID for shapefiles and ObjectID in geodatabases. Even creating a table in Catalog automatically creates a row id column named ObjectID. It has been pointed out that it isn't required to use ObjectID as the row id column name, but I couldn't find documentation on the subject. It is alluded to however.
What is an ObjectID does point out the following:
- An ArcGIS-maintained ObjectID field is automatically added to any table created using ArcGIS.
- If you register a table with the geodatabase that does not have a qualifying field, the geodatabase adds another field to the table that meets the requirements of an ObjectID and names it OBJECTID. If your table already contains a column that is named OBJECTID, the geodatabase adds a column named OBJECTID_1.
- If you register a table with the geodatabase and the table does contain a qualifying field (integer, not null), the existing column can be used as the ObjectID.
So if a table does contain a qualifying field (integer, not null), it can be used as the ObjectID, or row id column. This also states that one or more fields ( Integer (positive values only), String, GUID, Date ) can be used as row id columns. In the case of multiple fields, ArcGIS adds a field named ESRI_OID. However, neither discuss naming restrictions, so it can be assumed that naming methods of any field apply to row id column names as well.
Defining fields in tables states that
Field names in the same table must be unique; for instance, you can't have two columns with the name ObjectID. Field names must also start with a letter and not contain spaces or reserved words. Field names are limited to 64 characters for both file and personal geodatabases, 31 characters in SQL Server and SQLExpress, 30 characters in Oracle and DB2; dBASE is limited to 10 characters.
I've tested this and the row id column can be named anything I wish, as long as it adheres to the standard above.
Perhaps to someone with a better understanding of or more experience with ArcGIS behavior wouldn't have had trouble with this. However, I believe the question is something that many ArcGIS users don't have to worry with as they take it as ArcGIS gives it to them.