>>44552382
Well, you see, a primary key is a unique identifier of a resource. For instance, if you make a table of great French people (there are some), you'll get a primary key for Sadi Carnot (the president) and another primary key for Sadi Carnot (the physicist). Let's say the president as ID 1, and the physicist has ID 2.
Now you want to refer to these data in another table, but by using these keys. The keys in the other table will be called foreign keys. Foreign keys only have a meaning if you have the parent table where they are declared as primary keys.
For instance, if you want to make a table for the job of great French people, you'll say ID 1 was a president, ID 2 was a physicist, ID 2 was also an engineer (foreign keys may be duplicated, not primary key), and so on.
But if your table has a foreign key that isn't referenced (it doesn't correspond to any primary key in the parent table), you don't have referential integrity. Referential integrity is, by definition, the property "foreign keys are always referenced in the parent table".