Enforcing Naming Standards Using Naming Standards Templates

From ER/Studio Data Architect
Jump to: navigation, search

Go Up to Using ER/Studio Data Architect

In a Naming Standards Template you can define standards for character case, or add prefixes/suffixes to make the object types more easily recognizable. The Naming Standards Templates is comprised of an abbreviation list used to automatically convert logical to physical names and vice versa, and options for a given model that define case standards by object type, name length standards, and prefix/suffix standards. The Naming Standards Utility is used to apply the naming standards templates to a model or objects within a model.

A naming standards template can be created and stored either as either as part of a Naming Standards Template object in the Data Dictionary of a dm1 file or as XML data in an external file. Naming standard templates are supported in Enterprise Data Dictionaries as well as in local data dictionaries.

Once created and saved, the naming standards can be used when using other wizards within ER/Studio Data Architect, such as XML Schema Generation, Generate Physical Model, Compare and Merge, Model Validation, and Add New Physical Model. The naming standards templates can also be applied to domains, attributes/columns, and entities/tables through a Naming Standards tab in the object editors. When selected, the Freeze Names option in these editors prevents any naming standards applied from changing the name of the object selected.

Reference the following topics to create a new naming standards template, import an existing template, define, view or customize the naming standard template, export the naming standards template, and apply a naming standards template to a model using the Naming Standards Utility.

Creating a Naming Standards Template

There are two implementations of the Naming Standards Template Editor; one for creating an external template that can be imported for use with any diagram, and another for creating a template that is bound to the active diagram. The Naming Standards Editor, used to bind objects in the diagram to a naming standards template includes two tabs not present in the external template editor, Attachment Bindings and Binding Information.

To Create a naming standards template (NST)

  1. Choose one of the following options:
    • To create an external naming standards template and that is saved as an XML file, choose Tools > Naming Standards Editor.
    • To create a naming standards template that is saved as an object in the Data Dictionary of the active diagram, from the Data Model Explorer, Data Dictionary tab, right-click Naming Standards Templates node and then click New Naming Standards Template.
    Using either of the methods above launches the Naming Standard Template Editor.
  2. To save the new file and exit the utility, click OK.
    • If this template is an external file, a new naming standards template file is created in the Model directory. Naming standards templates have an extension of .nst.
    • If this template is a Data Dictionary object, the new naming standards template appears within the Data Model Explorer, Data Dictionary, Naming Standards Templates node.

Magic Wand Icon.pngTip: Once created, you can edit the naming standards template by double-clicking its object on the Data Dictionary tab to launch the editor.

The following will help you complete the options of the Naming Standards Template Editor:

Name tab

Logical and Physical tabs

Mapping tab

Order tab

General tab

Attachment Bindings tab

Binding Information tab

Track Versions of Naming Standards Templates

See Also

Name tab

  • Import from External Naming Standards Template: Enables you to important an XML-formatted naming standards template file into the diagram. This could be an external naming standards template that was created using the Naming Standards Template Editor accessible from the Tools menu.
  • Export to External Naming Standards Template: The naming standards template is saved with a file name extension of.nst. Other ER/Studio Data Architect users can then use the import function to open the naming standards template in their diagram.

Logical and Physical tabs

  • Case column: Select a conversion option to apply to each logical data model object type:

The results achieved by applying the case conversion options are described in the table that follows:

Case conversion option

Data model name

Converted name (spaces removed)

[none]

CUSTOMER ADDRESS CODE

CUSTOMERADDRESSCODE

UPPER

Customer

CUSTOMER

lower

CUSTOMER

customer

UpperCamel

CUSTOMER ADDRESS CODE

CustomerAddressCode

lowerCamel

CUSTOMER ADDRESS CODE

customerAddressCode

  • Prefix and Suffix columns: To enhance readability of models and code, you can add prefixes/suffixes so people reading the code from the model will more easily recognize object types. In the physical model you could add a T_ or V_ in front of each table or view name (prefix) so when users see the reference in a view, procedure or function, others will know what type of object it is. Adding a suffix can be used in the same way.

Mapping tab

  • Import/Export: Click to import or export an abbreviation list in a comma-delimited formatted file (.csv)
  • Abbreviations tab: Map logical names to physical names and then further qualify the name type. On this tab, you can also define illegal names, import an abbreviation list from a comma delimited file (.csv), or export the abbreviation list that displays to a.csv file.
  • To delete a row, simply select it and press Delete on the keyboard. The easiest way to select a row is by right-clicking on it. You can also select multiple rows using Shift or Ctrl while right-clicking
  • Prime: Indicates that the word entered in the Logical or Physical column makes the name unique such as, Customer, Employee, and Account.
  • Qualifier: Qualifies the class word to further define the meaning of the attribute. A name could have multiple modifiers. For example, a logical column name is Customer First Name ID, Customer is the Prime and ID is the Class. If there are abbreviations in the Naming Standards Template for the logical texts First and Name, and you check the qualifier box, ER/Studio Data Architect sorts First and Name as qualifiers when it reorders the text during translation.
  • Class: The type of data in an attribute. Class data is typically used in attribute and column names, not entity or table names. Most new naming standards have the class word at the end of the attribute name such as, name, date, code, id, and document.
  • Illegal: Words that are not allowed in names. These will mainly be used during the validation process.
  • Priority: Used to resolve duplicate physical abbreviations as names are transformed from physical to logical. The default value of the Priority field is Primary. The priority changes to Secondary when you define a mapping for a physical name that is already mapped to a logical name. You can change the priority by selecting the priority field, clicking the down arrow and selecting another priority. When you change the priority of an abbreviation from Secondary to Primary, the abbreviation that was previously Primary is changed to Secondary. A physical name can only have one primary abbreviation, but can have many secondary abbreviations.

Order tab

Specify the order of each part of the name for both logical and physical names. If the order is not specified, the order of the parts in the original name is maintained.

For each object type, select the corresponding cell in the Part 1 column, click the arrow, and then select which part of the name should come first when translating between logical and physical names. Then define the second and third part of the name if required.

  • To specify that an object part is unordered, select the appropriate cell in the part column, click the arrow and then select the ellipsis (...).

General tab

  • Delimiter Options area: Defines how to break up words in both the logical and physical model. For example, should Customer Number be translated to CustNum or Cust_Num. On this tab,
    To separate a word when a specific character is encountered, in the Delimiter Options section, click By Character and then type the character.
    To separate a word when a cases change is encountered, in the Delimiter Options section. select By Case.
  • Special Characters area: Specifies which characters are to be treated as special characters and how they are processed.

Attachment Bindings tab

Bind an external piece of information, or attachment to the naming standards template. You can also remove an attachment from an object, override an attachment binding's default value, or change the position of a bound attachment. To override the value of the attachment you have moved to the Selected Attachments grid, double-click the Value field of the target attachment. ER/Studio Data Architect opens the Value Override Editor or a list depending on the attachment datatype. Attachments are created in the Attachments folder of the Data Dictionary and must be applied to the reference value before they will display on this tab. For more information, see Attaching External Documents to the Data Model.

Binding Information tab

Select which object classes and/or specific objects can use this naming standards template. You can override this setting using the Naming Standards tab of the data model object editor.

Track Versions of Naming Standards Templates

You can track versions of a naming standards template (NST) by importing the NST into an NST object of an Enterprise Data Dictionary; a data dictionary that has been or will be added to the Repository. Whenever you check in the Data Dictionary, you can add notes describing the changes applied. You can view the version history of any object. in the Repository.

See Also