Can a database be tested to see if it is inconsistent?
As I was writing up a description for a sandbox project, I ran across a sandbox project for doing this:

http://drupal.org/sandbox/anton_krechetov/1345066

It currently only works for Drupal 6, and there haven't been any commits since Nov 2011, but it looks promising.