I have a mysql 5.6 schema with about 60 tables. I need to write some code (not sure if it will be Sql or java) to populate the data. The schema has lots of FK etc.
Is there some good way (I am thinking some tool, script...) I could use that will look at the metadata of the DDL and tell me in which order should I insert data in the tables so all FK are met?
I obviously want to avoid trial and error... The output of such script/tool would be for example: 1. insert into country/continent tables 2. insert person 3. insert ocupation/cv