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.
The window allows you to:
In addition, Data Generator provides the Preview window that shows a table with the actual generated data.
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.
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.
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.
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 .
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.
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.
While selecting tables and customizing generators, the Preview window displays the actual data to be generated in real-time.
After setting the generation parameters for all the required columns, click the green arrow button.