![]() | ![]() |
Home |
|
|
WarehouseArchitect - User's Guide |
|
| Part 3 WarehouseArchitect Model |
|
| Chapter 22: Database Creation and Modification |
|
| Using test data |
You normally use test data to verify the performance of a database that is being developed. You can use test data to do the following:
You can generate test data for selected tables in a WAM, or for all the tables in a WAM.
You can add test data to an empty database or to a database that already contains data.
When you assign a data profile to a column, it acts as a representative for the data type of that column. Test data for the column is then generated using the data profile and its defined data source.
You can also select a data profile to apply to a domain. You can then choose to have the profile automatically assigned to all columns that use that domain.
A data profile uses one of the following classes of data types:
When you create a data profile you need to define the following properties:
| Property
| Description
|
|---|---|
| Name
| Name of the profile
|
| Code
| Code of the data profile
|
| Class
| You can assign one of the following data type classes for each data profile: Number Character Date/Time
|
The List of Profiles appears.
or
Click the New button.
or
Type a profile name and click the Equals button in the code column.
or
Type a profile code and click the Equals button in the name column.
or
Click another profile name line.
You define a test data generation source for each data profile. You can use the following test data generation sources:
| Generation source
| Test data values are generated
|
|---|---|
| Automatic
| Automatically by PowerDesigner
|
| File
| From a source file
|
| List
| From a list of test data values
|
| ODBC data source
| From a target ODBC data source
|
There are different automatic test data generation source parameters for each profile class.
You have the following options to define generation source parameters for the profile class Number:
| Option
| Description
|
|---|---|
| Random
| Indicates to generate random data
|
| Sequential
| Indicates to generate sequential data
|
| From/To
| Indicates the range for random or sequential data
|
| Step
| Indicates interval between each sequential number step
|
| Generate decimal numbers
| Generates decimal numbers
|
| Decimal digits number
| Indicates the maximum number of decimal places to be generated
|
You have the following options to define generation source parameters for the profile class Character:
| Option
| Description
|
|---|---|
| Valid characters
| List of authorized characters
|
| All
| Accepts all characters
|
| Invalid characters
| List of unauthorized characters
|
| No accents
| Replaces accents with unaccented characters
|
| Mask
| String of mask characters.
|
| Default
| When selected, sets default values for Valid, Invalid and Mask characters
|
| Uppercase Lowercase Mixed case First uppercase
| Indicates authorized letter cases
|
| Exact
| You indicate exact character length
|
| From
| You indicate character length range
|
The following syntax applies to valid and invalid characters.
| Character set
| Syntax
| Example
|
|---|---|---|
| Interval of characters
| Characters in single quotation marks separated by a dash
| 'a'-'z'
|
| Single character
| Character in quotation marks
| "a"
|
| Character string
| String in quotation marks
| "xyz"
|
| Mask character
|
Prompts to enter
|
|---|---|
| A
| Letter
|
| 9
| Number
|
| ?
| Any character
|
You can define the following generation source parameters for the profile class Date/Time:
| Value
| Parameter
| Description
|
|---|---|---|
| Type
| Random
| Generates random values
|
| Sequential
| Generates sequential values
| |
| Date range
| From/To
| Indicates range of date values
|
| Time range
| From/To
| Indicates range of time values
|
| Step
| Date/Time step
| Indicates date and time intervals for sequential data values.
|
The List of Profiles appears.
The Profile dialog box appears.
You return to the List of Profiles.
or
Select another profile.
You can import a CSV file to define a data generation source for a data profile.
| Example test data files PowerDesigner provides example test data files in the PowerDesigner 6 TESTDATA directory.
|
The List of Profiles appears.
A dialog box asks you to select a file.
| Specifying the CSV directory If you are importing a CSV file for the first time from a specific directory, you need to select the appropriate directory.
|
You return to the List of Profiles.
or
Select another profile.
You can use information from a list to define a test data generation source for a data profile.
The List of Profiles appears.
A List of Values appears.
You return to the List of Profiles.
or
Select another profile.
You can use information from an ODBC data source to define a test data generation source for a data profile.
The List of Profiles appears.
An ODBC Source dialog box appears.
or
If you want to specify multiple tables as a data source, or specify a criteria for the data source, select the User-Defined Query checkbox and type a SQL query in the textbox.
You return to the List of Profiles.
or
Select another profile.
Fill parameters determine how a column is filled or populated with test data. You can define column fill parameters when you assign a data profile to the column, or as an independent procedure.
You can define the following fill parameters:
| Value
| Description
|
|---|---|
| Null values
| Percentage of column entries for which a null value is permitted
|
| Distinct values
| Indication of the percentage of column rows that contain unique entries. This is a maximum value, and can change automatically depending on the referential integrity parameters of primary key columns
|
| Average Length The Average Length box is only used for the Compute data base size function. The value that is displayed by default, is the maximum length for the data type defined for a selected column.
|
| Indicator
| Property
| When selected, indicates that...
|
|---|---|---|
| M
| Mandatory
| Column must be assigned a value. The fill parameter Null value is automatically defined as 0%
|
| U
| Unique column
| Column is the only column in a primary key, alternate key, or unique index. The fill parameters Null Values and Distinct Values are automatically defined as 0% and 100% respectively
|
| F
| Foreign
| Column is a foreign key column. You cannot assign a data profile to this column. It automatically takes the data profile of the corresponding primary key column in the parent table
|
or
Click the property tool and click a table in the model.
The Table property sheet appears.
The Fill Parameters dialog box appears.
An arrow appears at the beginning of the line.
Null values
Distinct values
or
Click another column in the list.
When you assign a data profile to a column, the data profile defines the type of test data that you generate for that column.
You can assign a data profile to each column in a table, except for the foreign key columns. The data profiles for foreign keys are assigned by default.
When you assign a data profile to a column that contains check parameters, the generated test data respects the column constraints.
There are three approaches to assigning data profiles:
or
Click the property tool and click a table in the model.
The Table property sheet appears.
The Fill Parameters dialog box appears.
An arrow appears at the beginning of the line.
or
Select another column in the list.
You can assign a data profile from the list of profiles
The List of Profiles appears.
An arrow appears at the beginning of the line.
The Select Objects dialog box displays available and selected objects. Columns are the only objects available from the Available Objects listbox.
The selected columns appear in the Selected Objects list.
You return to the List of Profiles.
or
Click another data profile from the list.
You can import data profiles in PRF format from another WAM. The imported profiles appear in the list of profiles.
The Import Profile Definitions dialog box appears.
You can export data profiles to a PRF file. In another WAM, you can then import the data profiles defined in this PRF file.
A list of profiles appears.
A Save As dialog box appears.
You can generate test data for all the tables in a WAM, or for selected tables.
| Parameter
| Result of selection
|
|---|---|
| All
| Generates test data for all tables in model
|
| Selected
| Generates test data only for tables selected graphically in model
|
| List
| Generates test data only for tables selected from a list of tables in model
|
| Delete old data
| Deletes all existing test data
|
| Default number of rows
| Indicates default number of rows for table
|
| Default number profile
| Indicates default number profile for table
|
| Default character profile
| Indicates default character profile for table
|
| Default date/time profile
| Indicates default date/time profile for table
|
| List item
| Description
|
|---|---|
| Table
| Tables in the database
|
| Defined
| Number of rows indicated for each table as defined in the table property sheet
|
| Generated
| Number of rows of test data for each table that you want to generate. You can modify this value. The default number of rows is the value defined for the table in the Parameters page. If you have not defined a default value, the number 10 is assigned automatically
|
| Option
| Result of selection
|
|---|---|
| Uppercase
| Script contains all uppercase characters
|
| Lowercase
| Script contains all lowercase characters
|
| No accent
| Non-accented characters replace accented characters in script
|
| Codes
| Script refers to objects by their codes
|
| Names
| Script refers to objects by their names
|
| Windows(ANSI)
| Script uses ANSI character set
|
| DOS (OEM)
| Script uses DOS character set
|
| Add title
| Each section of the script includes commentary in the form of titles
|
| ODBC syntax
| Generates script in ODBC syntax instead of DBMS-specific syntax
|
| Check model
| Check the WAM before generating the test database or script, and stop generation if an error is found
|
| CSV Format
| Generates script in CSV file format. The decimal and list separators used in CSV file format are defined in the regional settings configuration of your computer
|
| Auto
| Commit automatically during script generation
|
| At end
| Commit at end of script generation
|
| By packet
| Commit at defined intervals during script generation
|
The Test Data Generation dialog box opens to the parameters page.
The Number of Rows page appears.
The Options page appears.
A confirmation box asks you to confirm the deletion of all existing data.
A dialog box asks you to identify a data source and connection parameters.
A message window shows the progress of the test data generation process.
You can generate a test data generation script from the Test data generation dialog box.
A confirmation box asks you to confirm the deletion of all existing data.
A message window shows the progress of the test data generation process.
A confirmation box asks you if you want to view the completed script.
You return to the message window.
You return to the Test data generation dialog box.
|
|