dbTalk Databases Forums  

naming column names

comp.databases.ms-sqlserver comp.databases.ms-sqlserver


Discuss naming column names in the comp.databases.ms-sqlserver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
John.Arthur@gmail.com
 
Posts: n/a

Default naming column names - 04-09-2005 , 02:00 AM






Hi,

I am learning Ms Sql and I found that a lot of the tables I am finding
( in different tutorials ) are using special names for their column
names such like au_username, au_salery ...
Is the any naming convention for column names, or just at all is there
any reason for naming the table columns in specific way.

Thanks in advance.


Reply With Quote
  #2  
Old   
John Bell
 
Posts: n/a

Default Re: naming column names - 04-09-2005 , 03:02 AM






Hi

You can use
http://vyaskn.tripod.com/object_naming.htm

Although I am not a fan of extending column names to include (part of a)
table name as it should be redundant if the tables are always referenced
with the tables alias in the code. It is important to be able to easily
differentiate tables/views/functions as well as a naming consistentency and
clear code formatting.

John

<John.Arthur (AT) gmail (DOT) com> wrote

Quote:
Hi,

I am learning Ms Sql and I found that a lot of the tables I am finding
( in different tutorials ) are using special names for their column
names such like au_username, au_salery ...
Is the any naming convention for column names, or just at all is there
any reason for naming the table columns in specific way.

Thanks in advance.




Reply With Quote
  #3  
Old   
julian_muir
 
Posts: n/a

Default Re: naming column names - 04-09-2005 , 08:41 PM



Its often personal. My preference (over 10 years of db design, and DBA) is
to use simple names with no table or type extensions.Therefore au_user
becomes user, au_salary becomes salary.

The main reason for simple naming is that end-users frequently see table and
field names and they tend to find extended naming structures confusing.

The most important thing is to be completely consistent ;-)

Hungarian (including type in name) can be more useful in programming but
even that is debatable with modern IDE's and debugging tools (IMHO)

Julian


<John.Arthur (AT) gmail (DOT) com> wrote

Quote:
Hi,

I am learning Ms Sql and I found that a lot of the tables I am finding
( in different tutorials ) are using special names for their column
names such like au_username, au_salery ...
Is the any naming convention for column names, or just at all is there
any reason for naming the table columns in specific way.

Thanks in advance.




Reply With Quote
  #4  
Old   
--CELKO--
 
Posts: n/a

Default Re: naming column names - 04-09-2005 , 09:07 PM



ISO-11179. I also have a book due out this year which gives rules for
data elment names based on that standard and which quotes a lot of
reading studies, etc.


Reply With Quote
  #5  
Old   
--CELKO--
 
Posts: n/a

Default Re: naming column names - 04-09-2005 , 09:12 PM



Too bad that virtually everything given there is in violationof the
ISO-11179 standards. The guy that posted them is an OO programmer and
not a data guy at all. The basic idea of the ISO standard is to name a
thing for what it is in the Universe of discourse. This guy names
things for where they are used (table name prefixes), and for how they
are used (pk prefixes) and they are implemented (trigger, index, etc.
postfixes).


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.