Home > Articles > Data

  • Print
  • + Share This
Like this article? We recommend

Naming Database Objects

Database object names cause yet another battle among developers and DBAs—and again, it's really a matter of preference. What you call database tables, views, stored procedures, and user-defined functions really makes no difference as far as application performance is concerned. However, it does affect readability and maintainability of your code.

Developers typically like including object types within database object names, so they opt for names such as these:

tblAuthors
vwCaliforniaAuthors
procGetAllAuthors

Similarly they prefer including data types within column names:

strLastName
numTotal
dtOrderDate

Then there are some (lazy) folks who like to abbreviate to the extreme so they don't have to type extra keystrokes. I've seen object names such as T1, v23, sp50; obviously, such object names aren't very descriptive. There are also DBAs (like me) who prefer self-documenting object names that can get quite long:

get_author_names_and_addresses

Finally, some folks like to pick confusing object names (perhaps for job security?):

ytirucesboj21548264

Again, the recommended practice is to agree on a single acceptable standard for everyone who creates database objects within your company.

  • + Share This
  • 🔖 Save To Your Account