Many databases have case insensitive column and table names (and this used to be even more the case than it is these days), so if you typed camelCasedColumnName
, what you actually ended up with was CAMELCASEDCOLUMNNAME
. Using underscores in your identifiers was much more readable in those databases, and a good practice even in case sensitive ones if you want to be able to change your backend database with a minimum of headaches.
On the code side, camelCase is the convention in Java for field identifiers, but in many other languages underscores are the convention for variable and method names. And there are tools that can convert between CamelCasedNames, underscored_names, or other formats without any additional effort on the developer's part when dealing with databases. (Ruby's ActiveRecord, for example, knows that a NameLikeThis
for a class maps to a name_like_this
for a table in your database.)