Verify Object Naming Conventions and Semantic Consistency

Visual Expert allows you to verify Naming Conventions among the objects belonging to a particular concept or business entity.

For example, let’s say there are several columns related to the Employee ID. It is best for code maintenance and readability that DBAs give the same name to all columns referring to this business entity.

Enter Visual Expert. The [Naming Consistency] macro will list all possible names used for Employee ID in the DB making it easy to compare. It can be used on Tables, Objects, and Views.

How to Check Object Naming Consistency Using Visual Expert?

  • Select the root of the Tables.
  • Go to Code Review > Naming Consistency in the navigation bar.
    Visual Expert will display all the DB table and column names in your database.
  • Click on the wrench icon to open the macro parameters.
    List Table Size with Row Count
  • Enter a string related to a business entity in the field “Filter on Item Name”. Visual Expert will narrow down the list of Tables accordingly.
    For example: The string “emp” will enlist the DB tables and columns related to the business entity “employee” as shown below:
    List Table Size with Row Count
    Note: You can mouse over the icons listed in the treeview to display a tooltip indicating the object type.
  • The red icon [Naming Consistency Red Icon] indicates that several items have the same name. It is ordinary for several tables to contain a column referring to the same entity.
  • Double-click on the Table “EMP_ID” to view the objects with this name. It can be seen that three tables are referring to the employee ID with a consistent name as they contain a column called “EMP_ID”.
    Check Tables Referring to Business Entity
  • On the contrary, the column named “EMPLOYEE_ID” which is also supposed to refer to the same business entity doesn’t respect the naming convention. To do so, this column must be renamed "EMP_ID" when the data model is modified (table creation, DB update, etc.).
    Check Tables Referring to Business Entity
  • To find where this column is used:
    Select the [EMPLOYEE_ID] column in the treeview.
    Click on [Table or View] under the Code Documentation section in the navigation bar.
    Check Table or View Using a Column
    Result: The EMPLOYEE_ID column belongs to the “APP_LOG Table”.
  • Renaming a column will require you to update all the references to this column in the code. To do so:
    Select the "EMPLOYEE_ID" column in the treeview.
    Go to Cross References > Impact Analysis in the navigation bar.
    Visual Expert will enlist all the items using this column as shown below:
    Enlist items using a column
  • Click on any item in the list to see the reference to the “EMPLOYEE_ID” column in its source code.
    Find Column Reference in Source Code

More from Naming Conventions

Visual Expert, Oracle, SQL Server, Database Objects, Naming Convention, Naming Consistency