Naming Standards (Part 1 of 4)
Object naming standards fall into two categories: 1. naming conventions and 2. identifier rules.SQL standards say little about naming conventions, but certain conventions have been adopted by programmers with many years of experience:
Choose names that are descriptive and meaningful with underscores. FB127 is meaningless. YEAR_TO_DATE_SALES or YTD_SALES is easily understood by everyone. Others may be using your tables and the meaning is clear to everyone. Each vendor has naming limits, but their size is generally large enough to be meaningful. Names like YEARTODATESALES are harder to read than YEAR_TO_DATE_SALES.
Use abbreviations consistently. Do not use YTD in some places and YEAR_TO_DATE in other places.
Use the same case consistently. Use all upper case or all lower case names. Postgre SQL converts unquoted object names to lower case, DB2 requires all upper case names, and other vendors are case sensitive. Using mixed-case names can cause problems.
Do not use double quoted names. Names bracketed by the double quote character (” “) are case sensitive and can be difficult to use.
Do not use manufacturer and brand names. Company and product names change.
