Naming Conventions

How to enable and maintain naming conventions for a project

SqlDBM Support avatar
Written by SqlDBM Support
Updated over a week ago

Naming conventions are an easy way to apply uniform corporate naming standards to all the objects in your project. You can find this feature in the main menu.

Learn more below to see what this feature includes.

Case Standards

You can define attribute names using naming rules:

  • 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

In this example, you can see how the Case Standards rules will affect objects names in your project.

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

Object Naming

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.

Complete list of objects where expressions are available :

  • Primary Keys (table, column)

  • Alternate Keys (table, column)

  • Clustering Keys (table, column)

  • Indexes (table, column)

  • Foreign Keys (parent table, parent column, child table, child column)

  • Relationships (parent table, parent column, child table, child column, index)

  • Virtual Relationships (parent table, parent column, child table, child column)

To edit expressions, press the pencil (edit) icon next to the object name mapping.

Glossary

Use Glossary for bulk renaming of individual fields or auto-expansion of naming abbreviations.

By entering the original text in the Name field, and its translation in Change to, you can update all existing physical names.

For individual column updates, the translation defined in the Glossary can be applied from Logical to Physical name by using the "Override" button.

Please avoid duplicate entries and special characters in the Glossary as these will cause an error.

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?