Naming Conventions

You can use naming conventions to specify a case, maximum length, and valid characters for object names and codes, and to invoke conversion scripts and conversion lists to generate appropriate object codes from names (or names from codes).


Naming Conventions

To set naming conventions to control the names and codes of all objects, select Tools > Model Options and click on the Naming Convention node. To set naming conventions for a particular kind of object, select its node under the Naming Convention node.

The following options are available on the Naming Convention node only and apply to all objects:

Option

Description

Display

Specifies whether object names or codes are displayed in the Browser and on diagram symbols. You can override this setting for diagram symbols by setting the appropriate display preferences (see Display Preferences).

Enable name/code conversions

By default, when you enter an object name, the object code is autogenerated by applying the naming conventions specified on the Code tab below. Select this option to additionally apply the conversion scripts and conversion tables specified on the Name to Code tab (see Name and Code Conversion Scripts).

You can decouple an object's code from its name by clicking to release the = button to the right of the Code field in the object property sheet and entering your own code (which will still be subject to the naming conventions). You can autogenerate a name from a code by clicking the = button to the right of the Name field.

The following options are available on each of the Name and Code tabs of the Naming Convention node (where they apply to all objects) and on each of the sub-nodes (where they apply to the selected object):

Option

Description

Naming Template

Specifies a naming template to supply the naming conventions for the name or code. A naming template contains the same fields as those on this tab, but in a format that can be reused for other objects (see Creating a Naming Template). Click the ellipsis button to the right of this field to open the List of Naming Templates or click the Properties tool to view and edit the selected template.

Maximum Length

Specifies the maximum number of characters permitted in a name or code. In a PDM, this maximum may be set here and/or in the DBMS definition file. If both are specified, then PowerDesigner applies the stricter constraint. For example, in the case where you set 128 here and the DBMS file specifies 30, PowerDesigner will apply the 30 character limit.

Character Case

Specifies the case to apply to the name or code. You can choose between:
  • UPPERCASE
  • lowercase
  • Mixed CASe
  • Title Case (Name only)
  • UpperCamelCase (Code only)
  • lowerCamelCase (Code only)

Valid Characters

Specifies the list of characters permitted in the name or code. Character ranges are entered between single quotes and separated by a dash. Individual or multiple characters are entered between double quotes. Each valid item is separated by a comma. By default, PowerDesigner allows the following valid characters for codes:
'a'-'z','A'-'Z','0'-'9',"_"
Select the All valid check box to the right of this field to permit any character.

Invalid Characters

Specifies the list of characters not permitted in the name or code. By default, PowerDesigner excludes the following characters for names:
"+-*/\.,!:;"
Select the No accents check box to the right of this field to remove accents from accented characters.

Default Character

Specifies the character that is used to replace any invalid characters that are entered.