Applying a Constraint Business Rule to a Table or a Column

You can attach a constraint business rule to a table or a column. You cannot reuse a constraint business rule between different objects, so you must create as many as needed for your model objects.

When you attach a constraint business rule to an object, the code of the business rule will be used as the constraint name. If you wish to enforce code uniqueness for constraints in your model, you have to set the UniqueConstName entry in the General category of the DBMS to Yes. In such case, the code of the constraint generated from validation business rules and the code of the constraint business rules must be unique in the model.

For more information on DBMS entries, see the DBMS Resource File Reference chapter in the Customizing and Extending PowerDesigner manual.

  1. Open the table or column's property sheet and click the Rules tab.
  2. Click the Add Objects tool to open a list of available business rules.
  3. Select a constraint business rule from the selection list and click OK to attach it to the object.

  4. [optional] Click Apply to confirm the attachment of the rule and then click the Preview tab to verify that the constraint has been created in the script:
  5. Click OK to return to the diagram.