I have a database where column names are all camel cased. No problems encountered. Will that be a problem under some scenarios, as per recent versions of MySQL, Postgres?
1 Answer
The only cases I can think of for MySQL where case sensitivity could be an issue would be
- Case #1 : Data Dictionary entries for tables by table_name (See my post Is it okay to have different lower_case_table_names value on master and slave?)
- Case #2 : Migrating InnoDB tables with referential constraints from Linux to Windows (see my posts MySQL case sensitivity for table names and Is it possible to use the same directory for 2 MySQL servers?)
In those cases, the table name can cause problems. As for column names, it should not be an issue.
-
Case #3: When you use an ORM based application (which uses camel/pascal case usually) and every time you migrate & generate code using the database schema, you need to convert every field name from snake_case to Camel/Pascal case (hundreds of fields), kind of breaks the point of ORMs.– mixdevNov 2, 2022 at 7:16
select ThisIsAColumnName from SomeTable
is the same asselect thisisacolumnanme from sometable
(according to the SQL standard) . This is true for all Postgres versions. On MySQL this depends the storage engine used, the MySQL and storage engine configuration and the file system that is used. I personally prefersnake_case
overCamelCase
in SQL - but that is just my opinion.