Login or Sign Up to become a member!
LessThanDot Sit Logo

LessThanDot

Data Management

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary. Once you register for an account you will have immediate access to the forums and all past articles and commentaries.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot friendfeed Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Your profile

Authors

Search

XML Feeds

Google Ads

« Test your Full Recovery model by restoring backupsDon't start your procedures with SP_ »
comments
Rate Post:
submit to reddit Digg!FacebookDotnetkicks

This is a naming convention issue. Tables should not be prefaced with tbl because it does nothing to add to the clarity of the code (self-documenting). It actually has the opposite effect because it takes longer to read it and causes you to perform an interpretation of the three letter abbreviation.

How to detect this problem:

  1. SELECT  *
  2. FROM    Information_Schema.tables
  3. WHERE   Table_Type = 'Base Table'
  4.         And Table_Name Like 'tbl%'

How to correct it: Rename the table to remove the prefix. This is not as simple as it seems because this table could be referenced from a number of places, including views, stored procedures, user defined functions, index creation scripts, in-line SQL (embedded within front end applications), etc...

Level of severity: mild

Level of difficulty: moderate to high

About the Author

George has been developing software professionally for 19 years, first for the department of defense, and then for various other companies. In 1998, George started his software company, Orbit Software, specializing in School Bus Transportation software. His specialty is refining SQL Server queries to deliver optimal performance.
Social SitingsTwitterLTD RSS Feed
394 views
submit to reddit Digg!FacebookDotnetkicks

Comments and Feedback

3 comments

Comment from: SQLDenis [Member] Email
I posted this yesterday as a comment in the other post but here it is again just for kicks

what about this table? Hungarion notation at its best :-)

CREATE TABLE tblEmployee (
intID int identity not null,
strLastName varchar(255) not null,
strFirstName varchar(255) not null,
dtmBirthDate datetime null
mnyAnnualSalary money null
......
.....
....
...
..
.)
11/05/09 @ 07:13
Comment from: chrissie1 [Member] Email
You want me to rename all my tables?
11/05/09 @ 07:31
Comment from: Emtucifor [Member] Email
proI verBelieve proI auxHave advAdequately advPreviously vrbDemonstrated conWhy vrbUsing nouPrefixes vrbIs advReally adjLame.

proThis vrbIs artA adjGood nouExample prpOf advHow nouPrefixes vrbLook prpTo proMe--advSimply adjNasty.

That might help for a while if you're really new to English, but it just trashes everything in the long run.
11/12/09 @ 12:54

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)