The software which generated that information had to rely on some basic rules of thumb regarding naming of keys. Drupal doesn't always follow those rules. No surprise that the results are not perfect. Try drawing a correct ERD for Drupal yourself with your human abilities. It's not easy.