Re: Naming Convention for Columns
Posted in 1998
Jason McElroy wrote: > > I always use types as well. My convention is: > ID = RDBMS generated unique identifier. > NUM = number that is not generated by the RDBMS. Could be generated > by external systems or programs > COUNT = contains a count of some entity > TYPE = a category of some sort > CODE = a short identifier for some entity with a longer name. E.g. > company_code = AMEX > NAME = the proper name for an entity. E.g. company_name = 'American > Express' > DESC = a description of an entity or code. E.g. error_desc = 'list > index out of bounds' How 'bout adding these: date - where only the days/months and years count. If your database has only datetime, set the time to 12:AM or whatever the default is when you stuff 3/27/97 into one of these beasts. time- where only the time matters. datetime- where both matter. For those who insist on abbreviations: DT, TM and DTTM Now, for financial considerations: trade for trade setl for settlement local for local cstmr for customer cstdn for custodian account for account. I've seen a show where they use accnt. It saves two letters. Why bother? instit for institution broker for broker My general rule is 7 is the max number of letters you want to type. Which jives with a number of psychological studies that have concluded the human brain has trouble with more than seven. That's why your phone number is seven, your Social Security id is 3-2-4 (3+2=5<7 or 2+4=6 <7), etc.