Chapter 9 Working with Data Models


Column checks (PDM)

The following PDM model checks are made on columns:

Check Description and Correction
Column name and code uniqueness Column names and codes must be unique in a table.

Manual correction: Modify the duplicate name/code

Automatic correction: Appends a number to the duplicate name/code
Column code maximum length The column code length is limited by the maximum length specified in the DBMS definition (MaxLen entry, in the Objects→Column category) or in the naming conventions of the model options.

Manual correction: Modify the column code length to meet this requirement

Automatic correction: Truncates the code length to the maximum length specified in the DBMS definition
Domain divergence Divergence is verified between columns, domains, and data types. Various checks and attributes are also examined. One or more of the Enforce non divergence model options must be selected.

Manual correction: Select one or more of the Enforce non divergence model options to enforce non divergence

Automatic correction: Restores divergent attributes from domain to column (domain values overwrite column values)
Column mandatory In some DBMS, the columns included in a key or a unique index should be mandatory.

Manual correction: Select the Mandatory check box in the column property sheet

Automatic correction: Makes the column mandatory
Detect inconsistencies between check parameters The values entered in the check parameters tab are inconsistent for numeric and string data types: default does not respect minimum and maximum values, or default does not belong to list of values, or values in list are not included in minimum and maximum values, or minimum is greater than maximum value. Check parameters must be defined consistently.

Manual correction: Modify default, minimum, maximum or list of values in the check parameters tab

Automatic correction: None
Precision > Maximum length The data type precision should not be greater than the length. Note that some DBMS accept a precision higher than the length.

Manual correction: Make the data type length greater than the precision

Automatic correction: None
Undefined data type A model should not contain columns with undefined data type, all columns should have a defined data type.

Manual correction: Select a data type in the column property sheet

Automatic correction: None
Foreign key column data type and constraint parameters divergence Primary/alternate and foreign key columns involved in a join should have consistent data types and constraint parameters.

Manual correction: Modify foreign key data types and constraint parameters to make them consistent

Automatic correction: Parent column overwrites existing data type and constraint parameters in the foreign key column
Column with sequence not in a key Since a sequence is used to initialize a key, it should be attached to a column that is part of a key. This applies to those DBMS that support sequences.

Manual correction: Attach the sequence to a column that is part of a key

Automatic correction: None
Auto-incremented column with data type not numeric An auto-incremented column must have a numeric data type.

Manual correction: Change the column data type

Automatic correction: Changes data type to numeric data type
Auto-incremented column is foreign key A foreign key column should not be auto-incremented.

Manual correction: Deselect the Indentity check box in the column property sheet

Automatic correction: None
Missing computed column expression A computed column should have a computed expression defined.

Manual correction: Add a computed expression to the column in the Details tab of the column property sheet

Automatic correction: None

 


Copyright (C) 2008. Sybase Inc. All rights reserved.