Foreign key mapping between objects to a foreign key reference between tables. Example. If a Rails application has a User class and a user can have many comments.

The Comment class will have a foreign key reference called user-id. Rails uses the class_name_id as a column name in the database table to identify a foreign key association with a another table or object.

The foreign key mapping must use dependent mapping pattern where, as an example, the music tracks must be owned by the album and cannot be referred outside of it. Adding a back pointer puts a link from the track back to the album. Rails does this adding inverse_of: class_name.

Diffing in the context of foreign key references, as described by Martin Fowler, refers to the process of comparing two sets of data to identify differences.