Linx Consulting, Inc.
10491 S. Hyacinth St.
Highlands Ranch, CO 80129-5412
(303) 916-5522
  spacer
 
     
Home
Products & Services
Database Tips
Of Interest
Last Updated on 6/27/2008
 
Product Samples

(click repeatedly to view a randomly selected set of product samples)

Click to Learn More!
     
 

Use a Naming Convention

There are many naming conventions to choose from and each naming convention has what seems like an unlimited number of variants. One such naming convention is the Hungarian Naming Convention; named after the nationality of it's creator, Charles Simonyi. The Hungarian Naming Convention is a robust naming convention that is easy to implement and has proven its worth over many years.

At a minimum a naming convention should do two things, which are to describe the data-type of the object or variable you are naming and describe how it is used within your application. Some examples are:

  • tbl for Tables - tblMain, tblLookupPrefix
  • qry for queries - qryMonthlyMailing, qryNewMembers
  • frm for forms - frmNames, frmAddresses

As with all rules, there are some exceptions. For example, you almost never see field names in a database table or class modules use more than a name that describes the object's function within the application.

By using the a Naming Convention you can avoid problems when working with database objects. For example, if you are working within Microsoft Access and create a textbox control by dragging the control onto a form or report from the database field list, Access will give the textbox control the same name as the field. Normally, this doesn't present any problems because the properties for the textbox control are different than the database field but there are a few properties that are the same, which could cause confusion when adding functions to calculated controls or when writing code. By appending a prefix such as 'txt' to the beginning of the textbox control name you will avoid confusion.

You can find more information about the Hungarian Naming Convention on the Microsoft® Website.

 
     
     
 

Copyright © 2007 - Linx Consulting, Inc.

PostgreSQL Powered
Database Development

Advanced Solutions International, Inc