Sqlserver-dba.com

Hungarian Notation is misunderstood

Hungarian notation refers to a identifier naming convention.  The variable indicates the variables use – as opposed to what they are.  Hungarian notation is often applied incorrectly.

Hungarian notation usage is characterised by variables using a group of lower case letters followed by a name given by the DBA\Developer\Programmer. Hungarian notation was widely used in the programming with C on MS Windows.

Examples in programming

liFlightPath    (li = long integer)

cAbbreviation (c=character)

I see a  misinterpretation of Hungarian Notation slip into SQL Server via either

a) programmers applying naming conventions, they would normally use in their programming environment

b) Migrating a data structure from another system

 

Examples of Hungarian Notation misuse in SQL Server

tblSalesData

vwCustomers

spAddress

fnConvertTime

 

These prefix examples are attempting to describe by what they are. Not the intended usage.

I don’t see the point of adding tbl, sp,fn,idx etc , as that all they can be.  If an object appears after EXEC , it won’t be a table , it will be a procedure.

 Working for different organisations , means dealing with different naming standards – if they have any in the first place.  The main aspect of creating a naming convention is to standardise object name and coding procedures.

See Also

SQL Server Database names with spaces

ISO-11179 Naming Conventions and SQL DDL

Author: Jack Vamvas (http://www.sqlserver-dba.com)

Author: Jack Vamvas (http://www.sqlserver-dba.com)

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment


sqlserver-dba.com | SQL Server Performance Tuning | SQL Server DBA:Everything | FAQ | Contact