Column Naming Standards - Request for Opinions
Posted in 1999
Topics: General Discussion
All, Would anyone like to offer their methodologies for column naming standards? The opinions within our organization regarding this subject are quite different except for the need for consistency. We have been arguing full names vs. abbreviations and prefixing (or not) each column name with the name (or an abbreviated name) of the table. The 18 character limit that Informix imposes adds more to the challenge. Has anybody had good success with a particular naming standard? Christopher Cale Systems Analyst Job Corps Data Center San Marcos, Tx 1-800-598-5008 or (512) 393-7223
DO NOT create column names to start with a prefix (abreviation) of the table name. Should the customer code be ord_cust_cd on the order table but cust_cust_cd on the customer table??? This would severely increase the difficulty of keeping referential integrity, the use of ERD, etc. My only other suggestion is to be consistent - always use _cd or _code not both, always use either _num _no _number not all of them...get the idea... Yes the 18 character limit causes you to use abbreviations but if you are consistent throughout your database Rob Vorbroker Christopher <chrisc@jcdcrs4.jobcorps.org> wrote in message news:7jjal0$433$1@news.xmission.com... > > > All, > > Would anyone like to offer their methodologies for column naming > standards? The opinions within our organization regarding this subject > are quite different except for the need for consistency. We have been > arguing full names vs. abbreviations and prefixing (or not) each column > name with the name (or an abbreviated name) of the table. The 18 > character limit that Informix imposes adds more to the challenge. > > Has anybody had good success with a particular naming standard? > > Christopher Cale > Systems Analyst > Job Corps Data Center > San Marcos, Tx > 1-800-598-5008 or (512) 393-7223 >
In article <IGc73.57$Bm6.7397@news.cwix.com>, robertb..vorbroker <robertb.?.vorbroker@cwix.com> writes >DO NOT create column names to start with a prefix (abreviation) of the table >name. >Should the customer code be ord_cust_cd on the order table but cust_cust_cd >on the >customer table??? This would severely increase the difficulty of keeping >referential integrity, the >use of ERD, etc. I agree. In our company we have a policy that if two columns on different table hold the same information then they should have the same column name. This makes it easier to decide which columns can be joined in queries. > >My only other suggestion is to be consistent - always use _cd or _code not >both, >always use either _num _no _number not all of them...get the idea... >Yes the 18 character limit causes you to use abbreviations but if you are >consistent throughout your database > >Rob Vorbroker > We initially drew up a list of standard abbreviations for common abbreviations such as "no" (number) "ind" indicator, "act" (active). This was then supplemented with abbreviations for common business entities such as "cu" (customer) and "haul" (haulier). Some poor sucker was then nominated the "custodian of the abbreviation list". No new abbreviations could be used without the custodian's approval. In addition, the custodian had to vet all new column name, either for new tables or additions to existing tables. By vesting this responsibility in one person we have managed to achieve some sort of consistency across databases. In addition, we have made a ruling that all table names should be in the singular form i.e. customer and not customers. Our abbreviation standards only applies to column naming. Where possible, table names are spelt in full. However we still have some "legacy" databases which were created before the standards were drafted. These exist to remind us why we adopted the standards and why the old guard break the fingers of any newbie who attempts to deviate from the standards :-) >Christopher <chrisc@jcdcrs4.jobcorps.org> wrote in message >news:7jjal0$433$1@news.xmission.com... >> >> >> All, >> >> Would anyone like to offer their methodologies for column naming >> standards? The opinions within our organization regarding this subject >> are quite different except for the need for consistency. We have been >> arguing full names vs. abbreviations and prefixing (or not) each column >> name with the name (or an abbreviated name) of the table. The 18 >> character limit that Informix imposes adds more to the challenge. >> >> Has anybody had good success with a particular naming standard? >> >> Christopher Cale >> Systems Analyst >> Job Corps Data Center >> San Marcos, Tx >> 1-800-598-5008 or (512) 393-7223 >> > > -- Steve Wright Senior Analyst Programmer Lafarge Redland Aggregates, UK
Christopher wrote: > > All, > > Would anyone like to offer their methodologies for column naming > standards? The opinions within our organization regarding this subject > are quite different except for the need for consistency. We have been > arguing full names vs. abbreviations and prefixing (or not) each column > name with the name (or an abbreviated name) of the table. The 18 > character limit that Informix imposes adds more to the challenge. > > Has anybody had good success with a particular naming standard? This is fodder for another religious war. Personally I hate prefixing the columns with tablename parts, I feel if you want that level of documentation the just always code "database@server:"owner".tablename.columnname" the full ANSI object naming standard. Informix supports this if you want it and have the fingers to spare. I had a partner who swore, though, that what you propose was the "Only way to fly!" So, as I said, religious war fodder! Art S. Kagel