Using secondary id as foreign key to other table
0
votes
2
answers
480
views
So I have a Customer table that is linked to different tables. For instance, a Configuration table is linked to Customer table.
Instead of using Customer Id as foreign key to the Configuration table, I would like to introduce a secondary id called Reference. This Reference has a value similar to GUID and would like to use this as Foreign Key to the Configuration table. The reason behind this is because I don't want to use the Id of the Customer table. We use integer as a data type for this and I don't want to expose this.
What could be the possible complications on implementing this approach?
Asked by rpmansion
(123 rep)
Aug 10, 2020, 01:27 PM
Last activity: Aug 6, 2025, 11:02 AM
Last activity: Aug 6, 2025, 11:02 AM