Keys are a key player in maintaining Referential Integrity so let’s look at some key combinations
A Primary Key with no Matching Foreign Key
Not a Problem, happens all the time
A Foreign Key with no Matching Primary Key
Primary Key was deleted, Rogue data entry
Manually Updating A Primary Key
Potential loss of all Foreign Key Links
Manually Updating A Foreign Key
Potential Orphan Creation, or Bad Relationship
While key alterations are possible most DBMS come with functionality to help maintain the keys and the referential integrity