Reputation: 3945
Suppose you have a table that contains imported data from multiple external data sources. What would you call the column that references the external primary key? That is, you have an internal auto-incrementing primary key called "id" but you need another column to reference the primary key on the imported data (which may contain duplicates). So it's not a traditional foreign key but an external foreign key.
Upvotes: 0
Views: 440
Reputation: 529
Late answer, but:
The simplest most-accurate unambiguous terminology really is 'External Key' from your original question. Avoiding the word 'foreign' may ensure it won't be confused with any internal structures. What the field should ultimately be called depends on your database design conventions/patterns and whether or not there are many different types of external keys scattered in your data.
e.g. If the column contains many types of different external identifiers from different systems, just use 'ExternalKey' as a generic reference.
and .. If you know the external key is always dedicated to a specific source, you can name it to be associated with the external system e.g. 'simpro_id' (or whatever) then some semantic association is retained in the name itself, making the intent clearer.
Upvotes: 1