• Home
  • /
  • Blog
  • /
  • T-SQL
  • /
  • Why you NEED Proper Object Naming Convention

Why you NEED Proper Object Naming Convention

By Charles

December 12, 2015

data info, data management, DBA, SQL

We have all been there.

We’ve been called in to look at an application having performance issues.

One of the first things we do is look through the objects to familiarize ourselves with what data is stored in which entities, only to find a lot of objects with the word TEMP in them.

Having a good naming scheme might seem trivial, but having hundreds of tables, many of which include TEMP, can mean different things to different people.

Some SQL developers might read TEMP as the table is a temporary backup copy of a current table, needed only for a short time.

Some BI developers might read the word TEMP as the data in the table is temporary and used as a staging table, but the table object is needed for the application to work.

Proper Object Naming Convention Guidelines

When naming objects, think about who might look at the application’s back end and choose a name to explain if the thing is a temporary backup copy that can be removed after a particular time or if you mean the data in the table is temporary.

Adding the word backup and a date or a change request number lets you quickly identify if something is needed, which is much easier than just adding TEMP and leaving the next person to figure out what you mean. 

If an object is temporary, remember to drop it after it has been used and is no longer needed.

So the next time you create and name objects, think about having a Proper Object Naming Convention that you and all the developers use and make sure it is enforced.


About the author

Microsoft Certified SQL Server DBA with over a decades experience including work for large FTSE 250 companies amongst others. The SQL Server stack has been the focus of almost all of my career in IT. I have experience designing, supporting and troubleshooting large Data Platform deployments.

You might also like

{"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}