PowerDesigner models Greenplum rules (which allow you to define alternate actions to be performed as well or instead of insertions, updates, or deletions), as extended objects with a stereotype of <<Rule>>.
You can create a rule in any of the following ways:
Select Add a Row tool.
to access the List of Rules, and click theRight-click the model or package in the Browser, and select
.You can modify an object's properties from its property sheet. To open an rule property sheet, double-click its Browser entry in the Rules folder.
The following extended attributes are available on the General tab:
Name |
Description |
---|---|
Table |
Specifies the table or view the rule applies to. Scripting name: RTable |
Action |
INSTEAD indicates that the commands should be executed instead of the original command. ALSO indicates that the commands should be executed in addition to the original command. Scripting name: RAction |
Event |
Specifies the event that raises the rule. Scripting name: REvent |
The following extended attributes are available on the Greenplum tab:
Name |
Description |
---|---|
Condition |
Specifies any SQL conditional expression (returning boolean). The condition expression may not refer to any tables except NEW and OLD, and may not contain aggregate functions. Scripting name: RCondition |
Command(s) |
Specifies the command or commands that make up the rule action. Valid commands are SELECT, INSERT, UPDATE, or DELETE. Scripting name: RCommand |