View Single Post
  #5 (permalink)  
Old 07-06-09, 13:02
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,246
captalisation can cause problems especially if you are working in a mixed Microsoft/Linux environment, some advocate not to use capitals but to capitalise the SQL eg SELECT my, column, list FROM mytable

theres numerous naming conventions out there. some peopel try to apply the Simonyi style notation (eg strThis, intThat and so on).. I'd argue there is no requirement to do so within the tables, within your application code its probably a good idea especiallyif you are using

Personally I prefer capitalising eg MyVariable, rather than myvariable.. for me its easier on the eye, easier to read. some advocate underscore eg tel_no, which I just think is ugly

however the one thing you can say on naming conventions is be consistent. if there is already a naming convention use it.

another thing to bear in mind as part of your convention is common abbreviations and perhaps just as importantly give column & table names a consistent name

eg TelNo in place of TelephoneNumber.. so NUmber should always be abbreviated in the same manner
Address is Addr and so on

some give the table name a plural eg you'd have a table products, rather than product

but be aware of any reserved words such as Desc, Name, Integer Date and so on.

style generic columns as say ID (for numbers), Type for text/char, dont include the table name eg in a table called products don't have a column called ProductID, have one called ID. if you prefer use ProductID where that value is acting as a FK to the ID in Products

But ultimately pick one that exists or develop one that meets your style and your requirememnt

frankly I suspect some of the naming conventions are more to do with individuals ego at seeing their name associated with a specific naming convention. it doesn't matter what you use, the real advantage of using a convention is that its easier to pick up your own work at a later date, or pick up someoone else's work.
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote