Easily discover the missing foreign keys in your DB schema !
How to use `Foreign Key Wizard`:
• 1. Get a Schema Dump of your MySQL database:
mysqldump -uroot -p --no-data dbname > schema.sql
.
• 2. Copy the Schema Dump & paste it here below.
• 3. Click on the button : Guess Foreign Key
Are you up for the challenge?
Why Foreign Keys are such a critical aspect of designing a database:
• The primary purpose of Foreign Keys is to prevent data corruption, by assuring Data Integrity.
For most applications, it is critical to enforce referential integrity for reliability and robustness, and to prevent well-meaning colleagues entering corrupted data by hand, notably when doing data fixes.
• Foreign Keys will also dramatically speed up all the queries based on foreign keys, notably the joins.
• You will be able to automatically generate neat ER diagrams, which may greatly improve your understanding of your database.