News for hackers. Stuff that matters.
Re:Ask HN: Inherited large MySQL database and need to make s... by viraptor on Saturday January 21, 2017 @06:02PM (#13452576)
Check the schema - maybe some tables have foreign indexes already. Then try to link up obvious names - do you have a table users and columns named user_id somewhere else?

Then if you still have disconnected tables, take a few sample rows and see what looks like identifiers / keys. You can join that column with another one in the database and see if they match up completely, or if one has IDs that the other one didn't.

As you're doing this, write down comments about what the tables contain, so you can do sanity checks (do users really reference foos? does that make sense?)

I'm assuming your question means you don't have access to the application for this database, or can't run it and sniff the queries from the network.

There are no comments on this comment yet.