Chapter 8 Using Business Rules in a PDM


Applying a constraint business rule to a table or a column

You can attach a constraint business rule to a table or a column, however you cannot reuse a constraint business rule between different objects, so you must create as many constraint business rules 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 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 chapter DBMS Reference Guide in the Advanced User Documentation .

Steps To attach a constraint business rule to an object:

  1. Open the object property sheet.
  2. Click the Rules tab to display the Rules page.
  3. Click the Add Objects tool.
  4. Select a constraint business rule from the selection list and click OK.

    The business rule appears in the list of business rules attached to the current object.
  5. Click Apply.
  6. Click the Preview tab if you are working on a table to verify that different constraints have been created in the script.
  7. Click OK.

 


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