Naming conventions for tables and columns in database [duplicate] Naming conventions for tables and columns in database [duplicate] database database

Naming conventions for tables and columns in database [duplicate]


You should use case #1 because it's free of case sensitivity problems. Also, camel case sucks with acronyms.

columnIDcolumnIdcolumnIDAlternativecolumnIdAlternativeRASCScoreRascScorecolumn_idcolumn_id_alternativerasc_score

Also, spaces between words are visually more pleasant than jamming everything together. Absolutely worth whatever perceived pain of typing an underscore there is. Underscores simulate spaces and compound nouns and phrases have spaces in normal, written language. TheOnlyPeopleToTypeLikeThisMayHaveBeenTheRomans.


Whatever you decide to choose, sticking to the same is most important, that is be consistent.

I prefer #2 as this is imo most readable and as mentioned before underscore is ugly and annoying to type. #4 is second best. #3 i like the least, both uppercase and underscore is overkill.


I agree with #2 for two reasons:

  1. Underscores ARE a pain to type.
  2. In .Net properties are usually cased this way. This makes all your naming match up - which is handy and helps in situations where you are using an ORM.

Coincidentally, I believe Java developers trend to use #4 in their classes. I'd change my answer to #4 if the client software is in Java.