I need some best practice advice.
I have a table called SectorID. It uses Standard and Poor’s classifications. They have their own system as follows:
Sector Code Sector Name
10 (Primary Key) Energy
15 Materials
20 Industrials
25 Consumer Discretionary
30 Consumer Staples
35 Health Care
40 Financials
45 Information Technology
50 Telecom Services
55 Utilities
I download an Excel spreadsheet that has individual securities and their sector codes. I set up a second table with a SecurityID field (PK, autonumber) and the SectorCode as the foreign key. It works well but I am wondering if I should not have an autonumber field in the first table and use it as a PK rather than their codes which could change.
But then I would not be linking a PK to a foreign key. I would be linking a field (still unique) to the foreign key.
Maybe this is all 6 ½ dozen but I would still like the forum’s trusted opinion.
Thanks
I have a table called SectorID. It uses Standard and Poor’s classifications. They have their own system as follows:
Sector Code Sector Name
10 (Primary Key) Energy
15 Materials
20 Industrials
25 Consumer Discretionary
30 Consumer Staples
35 Health Care
40 Financials
45 Information Technology
50 Telecom Services
55 Utilities
I download an Excel spreadsheet that has individual securities and their sector codes. I set up a second table with a SecurityID field (PK, autonumber) and the SectorCode as the foreign key. It works well but I am wondering if I should not have an autonumber field in the first table and use it as a PK rather than their codes which could change.
But then I would not be linking a PK to a foreign key. I would be linking a field (still unique) to the foreign key.
Maybe this is all 6 ½ dozen but I would still like the forum’s trusted opinion.
Thanks