Generating Data for Empty Database

This topic describes how to populate an empty database with meaningful test data using Data Generator. Let’s take the Scott database for demonstration purposes.

To Generate test data:

  1. On the Start Page, click New Data Generation.
  2. Specify the connection and select the Scott schema. Click Next.
  3. On the Options page, set required options and click Open. The following window will open.

The window allows you to:

  • select columns to be populated (in the Tables and columns to populate pane);
  • select a generator you want to use for each separate column (in the Generation settings pane);
  • customize generation parameters for each generator (in the Generation settings pane).

In addition, Data Generator provides the Preview window that shows a table with the actual generated data.

Selecting generators for individual columns

For a column you select, Data Generator automatically assigns a generator based on the column and table characteristics: name, data type, etc. You may select a different generator for the column and customize the parameters of this generator in the settings pane.

For this test case, we will generate data for columns EMPNO, ENAME, JOB, HIREDATE, SAL, and COMM in the EMP table.

NUMBER generator

When you select the EMPNO column, the NUMBER generator is automatically assigned to this column. The NUMBER generator generates random numeric values for the column. In addition to basic settings, you can specify the Min and Max values for the numbers to be generated.

NUMBER Generator

Last Name generator

When you select the ENAME column, the Last Name generator is automatically assigned to this column. The generator provides realistic last names. In addition to basic settings, you can specify a file to load last names from, as well as trim left and/or right trailing spacings.

Last Name Generator

Job Title generator

When you select the JOB column, the Job Title generator is automatically assigned to this column. The generator provide a wide range of job titles.

In the text box, you can specify a predefined regexp template to customize generated job titles using regexp expressions. The template may be also modified with snippets, counters, files, and columns, and generators .

Job Title Generator

Employment Term generator

When you select the HIREDATE column, the Employment Term generator is automatically assigned to this column. The data grid in the settings pane allows you to select weight ratios of long-term and short-term employees. The percentages of the employees will be automatically recalculated based on the selected weight ratios.

Employment Term Generator

US Annual Salary generator

Select the SAL column, and the US Annual Salary generator will be automatically selected for this column. The generator will populate the column with random salary-like numbers. You can specify a minimum and maximum values for the generated salary amounts.

US Annual Salary generator

While selecting tables and customizing generators, the Preview window displays the actual data to be generated in real-time.

Preview window

After setting the generation parameters for all the required columns, click the green arrow button.