The book R for data science written by Hadley says that
Check that your foreign keys match primary keys in another table. The best way to do this is with an