I thought that previously when I reverse engineered databases, mySql Workbench figured out the relationships from the id names and connected the tables leading to an awesome ERD, even when the foreign key constraint clauses don't exist and they are just used through the fields (xxxx_id) have the foreign key values.
However currently, when I pick various databases (I create them in rails) and try to import them I end up with this nasty looking smodge:
survey_sections.survey_header_idis an FK to
survey_headers (id). And he could be wrong.
_idto an FK column. Some use
id, others use
tablename_id, others use
tablenameID, etc... as a PK name. The list is endless. And what about compound PK and FKs? What if the constraint should be towards a
UNIQUEand not towards a
PRIMARYkey? How should WOrkbench (or anyone) guess?