Test Data Generator

Previous  Index  Next  How To Use

( Pro Edition )


Once near finishing your database structure, you also need to fill it with data in order to test your applications. Unlike most tools, Database Workbench comes equipped with a fully features Test Data Generator (TDG) tool which generates meaningful data and can use custom data as well. Do read the "notes" at the bottom of this page.


Test Data Generator - screen layout


The Test Data Generator has 3 distinctive parts -

1.Table/Column Selection Area
2.Table Settings Area
3.Column Settings Area


These parts are used to edit/create filler instructions. This has to be done before trying to fill your database with data.


You can start the filling process by clicking the green Run button - the default action is to create a second connection to your database and use that connection to create the data. This way, you can continue working in Database Workbench. If you ran out of allowed user connections, or don't mind stalling Database Workbench (you can always start second instance of the application), you can click the small arrow besides the button and choose the Start Filling - Non Threaded menu-item.


The Load Settings From File and Save Settings From File can be used to load and store your filler instructions. These files can also be used with the command-line version of the TDG, for example to run a filler-process during the night to generate huge amount of rows while you're not waiting.


Table/Column Selection Area

In part 1, you will see your database schema - it will show the table columns, NULLability and primary key columns. Here you can also tell the TDG to fill a table by checking the box left of the table name.


You can move a table up/down in the filling sequence by clicking the blue arrow buttons at the top of the screen.


Test Data Generator - some columns are being filled


As you can see in the above example, table ADRES is being filled with 10000 rows and columns ADRES2 and POSTCODE are not being filled yet.


By selecting a column, the appropriate settings for that particular data type become enabled in the Column Settings Area. After you've entered the filler settings, a green check mark will appear - as you can see in the above example.


Table Settings Area

The Table Settings Area holds the following settings:

Rows to generate

The amount of rows to generate for this table. If errors occur during filling, less rows will be created (default: 10000).

Rows per transaction

All rows can be generated in a single transaction, or after each number of rows, a transaction will be committed. This can improve the speed of the filling, as the database engine doesn't need to keep track of hundreds of thousands of rows in a single transaction (default: 1000).

Empty table for generating

Check this if you want to delete all rows before generating new ones - this will fail if there are referential constraints and it will abort the complete process if this happens. (default: False).

Disable indices

Check this to disable any user-defined indices, primary key and other constraint-related indices will not be disabled. Disabling indices can speed up the filling (default: True).

Disable triggers

Check this to disable any user-defined triggers on the table in order to avoid things to happen behind the screen (default: True).



Any disabled indices and/or triggers will be re-enabled after completion of the filling process.


Column Settings Area

The area where you change the column-filling settings. Depending on the data type, several filling options are available. Below is a fill-option availability matrix:

Filler type




Date & Time




Fixed Value







Random Value








Increasing Values



Sequence/Generator Value



Referential Link





Value From List




Custom Value


Complex Custom Value




In case of a BLOB column, a "value" means a streamed file, not an OLE object etc...
The character type "custom value" means a value from a text-file.


Each NULLable column allows a percentage of NULL values, for non-NULL columns, this is of course disabled.


The "Complex Custom Value" ("masked value") is a special way of filling and very powerful, it is reached by selecting Random Value from the drop down. This will show the following part of the screen:

Random Value - Complex Custom Value


As you can see in the above screen, for character data, there's a lot of possibilities. Below is a description of each of the possibilities:

Random Values

Random string of characters, with a minimum and maximum length.

Random URLs

Creates random website URLs.

Random e-mail addresses

Creates random email addresses.

Random phone numbers

Creates random phone-numbers in the US format.

Random addresses

Creates a random street-address by picking a random street name from a large repository of street names and appending a house number.

Random first names

Picks a random first name from a large repository of first names.

Random last names

Picks a random last name from a large repository of last names.

Random full names

Picks both a random first and last name and puts them together with a single white space.

Random cities

Picks a random city from a large repository of city names.

Random countries

Picks a random country from a list of available countries.

Masked values

Generates values by using the format given.


A = random upper case alphabetical character

a = random lower case alphabetical character

C/c = random alphabetical character

N/n = random numerical digit

R/r = random character, including digits, punctuation characters etc

H/h = random hex digit (0..9 - A..F)

[..] = between brackets, the text is taken as a constant



When loading seperate entries from a file, make sure each entry is on a new line
BLOBs will be pre-loaded, this can take up quite some memory, but increases INSERT speed


See also:

File and Folder Boxes
Date and Time Editing