Name Mapping Conventions Using Macros

You can establish name mapping rules for your logical/physical or logical model. (This option does not apply to physical-only models). The preferences you set are used in a number of ways. For example:

  • In a logical/physical model, to create the physical names of objects in relation to the logical names.
  • To set the defaults used when a physical model is derived from the logical level of the current model. For more information, see Set Preferences for Special Characters in Derived Physical Model Object Names.
  • To set the defaults used when the current model is added as a model source to a physical model.

By default, logical names are converted to physical names using the following conventions:

For attributes:

<entity name>+<logical domain name> (both in lower case)

Example:

movie rental record

For columns:

<attribute name translated into a column name with the underscore character used between individual words>.

Example:

movie_rental_record

Some of the commonly used macros for name mapping include:

  • %EntityName
  • %AttDomain
  • %AttName
  • %KeyType
  • %TableName
  • %OwnerEntity

Usage considerations:

  • The conversion from Entity to Table can be accomplished through the macros %EntityName or %EntityProp(UDP).
  • The logical to physical Domain conversion and Attribute to Column conversion should be used as is, without rearranging any macros.
  • The Key Group to Index conversion should be accomplished with the macros shown, although you can rearrange macros as needed. For example, X%KeyType%TableName or X_%TableName_%KeyType are valid alternatives.