Skip to main content

Naming Conventions and Case Standards

How to enable and maintain naming conventions for a project

SqlDBM Support avatar
Written by SqlDBM Support
Updated over 2 weeks ago

Standards and naming conventions are an easy way to apply and enforce uniform naming standards for the objects in your project.

This article covers the following features that can help modelers maintain consistent and uniform naming standards:

  1. Case standards - affects case (e.g., upper, lower, pascal) for project objects.

  2. Name mapping - controls the naming pattern (e.g., prefixes, suffixes) of object names

  3. Glossary - automated naming translation, like abbreviation, replacement, or expansion of business terms.

Except for "Name mapping", these tools are available for logical and physical names and projects.

Access the settings

Naming conventions, case standards, and a glossary can be accessed from the "Settings and connections" menu, which is located in the main SqlDBM project menu.

Learn more below to see what this feature includes.

1. Case standards

Control naming case standards using the following settings.

Please note that Cases Standards rules affect the names of all object types.

Physical

  • None — no rules. The feature is disabled

  • UPPER_CASE — all letters are capitalized, words are separated with underscores

  • lower_case — all letters are lower case, words are separated with underscores

  • Title_Case — words are separated with underscores and start with a capital letter

  • camelCase — the first word begins with a lower case letter, the remaining words are capital letters. All words are combined together without underscores

  • PascalCase — all words begin with capital letters and no spaces, underscores, or hyphens allowed. All words are combined together

Logical

  • None — no rules. The feature is disabled

  • UPPER CASE — all letters are capitalized, words are separated with spaces

  • lower case — all letters are lower case, words are separated with spaces

  • Title Case — words are separated with spaces and start with a capital letter

  • Sentence case — the first word begins with a capital letter and subsequent words are lower case, separated by spaces.

2. Name Mapping

You can add prefixes and suffixes to the names of different object types. This way, new instances of this object will automatically inherit the prefix or suffix.

If you want to add or delete a prefix, type it before the dollar sign (“$”). Or if you need to add a suffix, type it after the closing brace (“}”).

example:

- index rule: ind_${IdxName}_poc

- new index name: "CUSTOMER_DEPT"

- index name with the rule applied: "ind_CUSTOMER_DEPT_poc"

Name mapping are not affected by Case standards, so you have more flexibility for creating the rules. Let’s say, you set UPPER_CASE in case standards and added pre_${TableName}_sffx, after saving the rules, the new table object will have a “pre_TABLE_1_sffx” name.

Expressions

Expressions allow for more precise and dynamic object naming. For objects with related properties (e.g., related table and columns for a primary key) the properties can now be referenced in the object naming pattern.

Not all object names will offer expressions.

To edit expressions, press the pencil (edit) icon next to the object name mapping. Drag the desired available expressions onto the text area and edit accordingly.

3. Glossary

Use the Glossary for bulk renaming of individual fields or auto-expansion of naming abbreviations. Glossary rules can be set separately for Logical and Physical names.

For disabling or documenting legacy translation rules, a term can be set to "Not used".

To avoid inconsistencies, duplicate terms and transitive rules (i.e., A->B, B->C) are not allowed. Uniqueness is determined by the Term and what it applies to.

Excel import and export

Users can also maintain the Glossary via Excel upload and download. Similar to the Data Dictionary, download the existing Glossary to Excel, make changes, and upload back into SqlDBM.

Validate on project save

After you are done setting the naming conventions, save the rules by clicking the “Save Settings” button — all new objects you created will have names matching the established rules.

You can also apply naming conventions to your existing database model. In order to that, you need to click the “Apply to existing objects” button, all object names which don’t follow naming conventions will be changed. Pay attention to these objects as they will be considered as changes for Compare Revisions and Alter script features.

We recommend you set up the rules at the very beginning of the project.

Validate Changes

You or your team do not need to remember the established rules. Just mark the “Validate when saving” checkbox, and after each saving, SqlDBM will offer to rename objects that don’t follow the naming conventions you have in place.

See also:

Did this answer your question?