Generating Test Data that Satisfies Foreign Key Relationships with mysql_random_data_load
This tutorial explains how to create a test database, define tables with foreign key constraints, populate them with appropriate random data using mysql_random_data_load, and work around a known bug that forces the foreign‑key sample size to 100 rows.