Validation Rules Dialog - General Tab

You can create a validation rule in the General tab in the Validation Rules dialog.

Note: For information on validation rules when Oracle is your DBMS, see Oracle Validation Rules.

This tab contains the following options:

Validation Name/Validation Rule

Lists the name of existing validation rules and the actual syntax that appears in the schema when the rule is generated.

New

Opens the New Validation Rule dialog in which you can enter the name of a validation rule. In a logical/physical model, the physical validation rule name defaults to the logical validation rule name that you specify.

Rename

Opens the Rename Validation Rule dialog in which you can edit the name of the selected validation rule.

Delete

Deletes the selected validation rule.

User-Defined

Lets you enter an expression in the correct syntax for the selected server to create a server-side validation expression.

Min/Max

Displays Min and Max boxes. The corresponding validation rule is generated in the syntax of the selected server.

Min

Specifies the minimum value for a column or an attribute. Enter a value in this box.

Max

Specifies the maximum value for a column or an attribute. Enter a value in this box.

Min and Max

Specifies a range of values for a column or an attribute. Enter a value in both the Min and Max boxes.

Quote

Encloses each value in a list of valid values in a single quotation mark automatically when you select this check box. Clear this check box if you do not want to enclose each valid value in quotation marks. When values are included in an expression, each value is not enclosed in quotation marks (for example, C,D,M). In some cases, the syntax used by the target server requires that each value in an expression must be enclosed with single quotation marks (for example, 'C', 'D', 'M').

Not

Includes the word NOT in the server expression to invert it when you select this check box. Clear the check box if you do not want the server expression to include the word NOT. For example, if the server expression is BETWEEN 5 AND 10, and you select the NOT check box, the expression is changed to NOT BETWEEN 5 AND 10.

Valid Values List

Opens the Valid Values grid in which you can specify a list of valid values for the selected validation rule.

Quote

Encloses each value in a list of valid values in a single quotation mark automatically when you select this check box. Clear this check box to not enclose each valid value in quotation marks. When values are included in an expression, they are not enclosed in quotation marks (for example, C,D,M). In some cases, the syntax used by the target server requires that each value in an expression must be enclosed with single quotation marks (for example, 'C', 'D', 'M').

Not

Includes the word NOT in the server expression to invert it when you select this check box. Clear the check box if you do not want the server expression to include the word NOT. For example, if the server expression is BETWEEN 5 AND 10, and you select the NOT check box, the expression is changed to NOT BETWEEN 5 AND 10.

Valid Value

Lets you enter the valid values for the selected validation rule or click Import and import the valid values from a .txt or .csv file. Click the Valid Value column heading to sort the valid values in ascending order (for example, A-Z, 0-9). You can also copy valid values from a validation rule.

Display Value

Lets you enter the value that you want to display in the end-user application. For example, you can enter state abbreviations, such as NJ, PA, and TN in the valid values list and enter the corresponding full state names, New Jersey, Pennsylvania, and Tennessee, in the Display Value list to display these values in an end-user application.

Definition

Lets you enter a definition for the selected valid value.

Import

Opens the standard Windows Open dialog in which you can specify the text file or comma-separated values file that contains the valid values you wish to import.

Logical Only (Available only in the Logical model)

Specifies that the validation rule should apply to the logical model only.

Physical Only (Available only in the Physical model)

Specifies that the validation rule should apply to the physical model only.