Background

Originally, I needed to populate a database containing 14 complex tables. Tools such as Spawner are useful for populating small tables, but in this case, specifying the datatypes for 300+ fields to initiate Spawner would have been insanity.

Database Requirements

All table names and column names in the MySQL schema require back-ticks.

Unique keys must be removed from tables when using the option 'random_data' => FALSE

Other

The majority of MySQL datatypes are supported.

Any foreign keys are disabled on data population.

Random character generation is slow in PHP, and such slowness further depends on field length, number of fields, and the number of rows being generated.

Multiple INSERTs are added in a single query, which is quite fast. Number of INSERTs per second will depend on MySQL configuration settings (the defaults are not optimised), datatype / length inserted, system load, operating system, hardware etc.

Set-up

Adjust the array connection details and parameters in the file databasefiller_example.php