To view or edit a reference's properties, double-click its diagram symbol or Browser or list entry. The property sheet tabs and fields listed here are those available by default, before any customization of the interface by you or an administrator.
The General tab contains the following properties:
Property |
Description |
---|---|
Name/Code/Comment |
Identify the object. The name should clearly convey the object's purpose to non-technical users, while the code, which is used for generating code or scripts, may be abbreviated, and should not normally include spaces. You can optionally add a comment to provide more detailed information about the object. By default the code is generated from the name by applying the naming conventions specified in the model options. To decouple name-code synchronization, click to release the = button to the right of the Code field. |
Stereotype |
Extends the semantics of the object. You can enter a stereotype directly in this field, or add stereotypes to the list by specifying them in an extension file. |
Parent table/ Child table |
Specify the parent table (which contains the primary or alternate key or a user-selected column) and the child table (which contains the foreign key or a user-selected column) linked by the reference. Use the tools to the right of the Parent table field to create, browse for, or view the properties of the currently selected table. |
Parent role/ Child role |
Specify the roles of the parent and child tables in the reference (for example Contains and Is contained by. |
Generate |
Specifies to generate the reference in the database. |
Keywords |
Provide a way of loosely grouping objects through tagging. To enter multiple keywords, separate them with commas. |
The Joins tab lists the joins defined between parent and child table columns. Joins can link primary or alternate and foreign keys, or any user-specified columns.
Tool |
Description |
---|---|
Reuse Columns - Create a join by matching parent and child columns that share the same code and data type. |
|
Migrate Columns - First specify columns in the Parent Table Column column and then click this tool to migrate them to foreign key columns in the child table. If the columns do not exist in the child table, they are created. |
|
Cancel Migration - Remove any columns migrated to the child table. |
|
Insert/Add a Row - Inserts a row before the selected row in the list or at the end of the list to specify another column to join on. |
Select the Auto arrange join order check box to sort the list by the key column order or deselect it to re-arrange the columns using the arrow buttons. If this option is not available, to enable it, add the EnableChangeJoinOrder item to the Reference category in the DBMS definition file and set the value to YES (see Customizing and Extending PowerDesigner > DBMS Definition Files).
Referential integrity governs data consistency between primary or alternate keys and foreign keys by dictating what happens when you update or delete a value or delete a row in the parent table. The Integrity tab contains the following properties:
Property |
Description |
---|---|
Constraint name |
Specifies the name of the referential integrity constraint. Maximum length is 254 characters. If you edit this name, the User-defined button will be depressed. To return to the default name, click to release this button. |
Implementation |
Specifies how referential integrity will be implemented. You can choose between:
|
Cardinality |
Indicates the minimum and maximum number of instances in a child table permitted for each corresponding instance in the parent table. The following values are available by default:
Alternately, you can enter your own integer values in one of the following formats (using * or n to represent no limit):
|
Update/Delete constraint |
Specifies how updating a key value in the parent table will affect the foreign key value in the child table. Depending on the implementation and DBMS, you can choose between:
|
Mandatory parent |
Specifies that each foreign key value in the child table must have a corresponding key value, in the parent table. |
Change parent allowed |
Specifies that a foreign key value can change to select another value in the referenced key in the parent table. |
Check on commit |
[SQL Anywhere® only] Verifies referential integrity only on commit, instead of after row insertion. You can use this feature to control circular dependencies. |
Cluster |
Specifies that the reference constraint is a clustered constraint (for those DBMSs that support clustered indexes). |