• Wow, lots of work to try to programatically figure out keys!

    Thank heavens other companies don't use any constraints or unique indexes or normalization; they eventually provide customers to me.

    Having done hundreds of imports and conversions, I don't assume matching column names nor matching data types in commercial software. I do assume orphaned data is present that will prevent me from applying suggested primary and alternate and foreign keys. The process to figure out a non-normalized database is even more painful. Being human I have the ability to spot patterns that computers can't quite do yet. For now I'll stick to doing this manually.