Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 

We'll go no more a' tibbling

By Phil Factor,

I have to admit that I've never liked Hungarian notation in database work. I've often heard it called 'tibbling' in development groups, after the horrible habit of prefixing table names with the lowercase tbl (table without the vowels). So you end up with tables called tblCustomer, tblInvoice, tblSales and so on. The same started happening with indexes (idxName and so on), and stored procedures, so that everything became spThisAndThat. This made conversation about data issues rather difficult as it was never clear how to say the word tblCustomer or tvfMyFunction.

Hungarian Notation was originally developed by Charles Simonyi, who went on to become a chief architect at Microsoft, as a quick fix to the errors that came from programming in BCPL, a very loosely typed language. It caught on so well that it became a part of object-oriented orthodoxy, particularly at Microsoft. In SQL, where it wasn't necessary, we Database developers managed to stay aloof from the practice of tibbling until we started to get Microsoft Access applications being 'migrated' into SQL Server. The developers, who used Hungarian notation for their Visual Basic, naturally had done the same for the database objects and the names were perpetuated when the migration occurred: Because of this, and because a generation of programmers have been brought up with the idea that Hungarian notation is the way to do it, SQL Server is now hopelessly infected with the practice.

Hungarian notation isn't necessary in any compiler that does strong type-checking. SQL can occasionally produce errors where implicit conversion of data types happens, but these errors are too subtle to be caught by tibbling. Another problem is that, where a column's datatype is changed, then the name of the column has to be changed. Anyone who has done this, and has fallen foul of dynamic SQL and the problems of finding and renaming all the instances of the column, or other objects, due to the vagueness of the dependency checker, will want to avoid too much of this.

However, my biggest objection to Hungarian notation is that it gives a false sense of security. Even if you are a strict adherent, and use Hungarian notation to tell you the object type, and maybe the datatype, it doesn't tell you the purpose, or intended use, of the object. No; as the old folk song goes "We'll go no more a tibbling, though whitsuntide is nigh"

Total article views: 389 | Views in the last 30 days: 3
 
Related Articles
FORUM

Hungarian notation convention

Hungarian notation convention

BLOG

Hungarian Notation is misunderstood

Hungarian notation refers to a identifier naming convention.  The variable indicates the variables u...

FORUM

Hungarian Notation is misunderstood

Comments posted to this topic are about the item [B]Hungarian Notation is misunderstood[/B]

FORUM

Hungarian Notation To Be or Not To Be

The Data Warehouse team decided to use Hungarian notation on their SQL Server database (they aren't ...

FORUM

We'll go no more a' tibbling

Comments posted to this topic are about the item [B]We'll go no more a' tibbling[/B] I don't mind ti...

Tags
editorial    
naming standards    
 
Contribute

Join the most active online SQL Server Community

SQL knowledge, delivered daily, free:

Email address:  

You make SSC a better place

As a member of SQLServerCentral, you get free access to loads of fresh content: thousands of articles and SQL scripts, a library of free eBooks, a weekly database news roundup, a great Q & A platform… And it’s our huge, buzzing community of SQL Server Professionals that makes it such a success.

Join us!

Steve Jones
Editor, SQLServerCentral.com

Already a member? Jump in:

Email address:   Password:   Remember me: Forgotten your password?
Steve Jones