Mailing the story:
Checking DIY primary/foreign key relationships
In some of the data tables I audit, the primary and foreign keys have been built manually, often in Excel spreadsheets. Checking for the resulting stuff-ups can be done on the command line.