Hi all,
For two tables association (join, relate, and relationship class), I want to ask if it is necessary for the keys (the matching fields) to be the same data type? Could we associate two tables: the first's primary key is long and the second one is short?
why not use the following to see if that is the case
Validate Join (Data Management)—ArcGIS Pro | Documentation
In the ArcGIS Pro Help documentation for Primary Key and Foreign key it states - "The key fields may have different names but must be of the same data type and contain the same kind of information, such as parcel IDs." So yes, same field type is required for Relationship Classes.
For Joins and Relates - again yes per the documentation - "The name of the field does not have to be the same, but the data type must be the same; you join numbers to numbers, strings to strings, and so on."
Joining attributes in one table to another
Typically, you'll join a table of data to a layer based on the value of a field that can be found in both tables. The name of the field does not have to be the same, but the data type has to be the same; you join numbers to numbers, strings to strings, and so on. You can perform a join with either the Join Data dialog box, accessed by right-clicking a layer in ArcMap, or the Add Join tool.
As long and short are both basically numbers, the Join should work fine.