I import text files created by various types of dbs into mysql. They usually come in a set of files that are likely related by keys. I usually have no information about the schema and the text files are of varying quality and sometimes do not relate.

Instead of having a person go through the imported data to determine the relationships, are there common algorithms or open source tools that can report relationships among tables?

For example, say I have imported 3 text files into mysql format:

Auto(id(pk), make, model)
Driver(id(pk), fn, ln, address)
Accident(id(pk), aid(fk), did(fk), location, type, estimate)

What open source tools or methods exist to automatically determine and report the relationships in this structure when supplied no information other than what is in the text file? (this is a simple example which in reality is much more compliated)