Chapter 3 Building Conceptual Data Models


Using a validation rule in check parameters in a CDM

A validation rule is a rule that validates data based on a corresponding business rule. A validation rule can be generated as a check parameter when the following conditions apply:

At generation, validation rule variables are instantiated with the following values:

Variable Value
%COLUMN% Code of the column to which the business rule applies
%DOMAIN% Code of the domain to which the business rule applies
%TABLE% Code of the table to which the business rule applies
%MINMAX% Minimum and maximum values for the entity attribute or domain
%LISTVAL% List values for the entity attribute or domain
%RULES% Server validation rules for the entity attribute or domain

For more information on defining business rules, see the Using Business Rules in a CDM chapter.

Steps To use a validation rule in check parameters:

  1. Open the property sheet of a domain, entity, or entity attribute, and click the Rules tab.
  2. Click the Add Objects button to open a selection box, and select a business rule in the list.
  3. Click OK in each of the dialog boxes.

    Note   Validation rule expressions
    You must click the Rules button to modify the expression attached to a validation rule. You can also modify validation rule expressions from the list of business rules, by clicking the Define button.


 


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