PK-FK Names

Primary and foreign keys frequently have the same names, but it is possible to use entirely different names for the fields. For instance, in the following ER diagram, ParentID is the name of the parent table's primary key, but MotherID is the name of the child table's foreign key. We could have named it ParentID, but MotherID is perfectly acceptable.


In fact, there are times when you absolutely must use different names. For example, if you have two parallel relationships between the parent and the child table, then it would be impossible to use the same FK field names in the child table. For instance, in the following ER diagram, ParentID is the name of the primary key in tblParent, but MotherID and FatherID are the names of the two foreign keys in tblChild.

More FAQs