Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

Why is it that different platforms (linux vs windows) does not support the same naming conventions? I'm stunned by the fact that the documentation uses file names as an excuse for this.

Yes, windows is not case sensitive for file names but one would think the developers would accommodate for this. I (personal preference) despise the under_score_convention and prefer camelCaseConvention.

Is there a way to enable the camel case sensitivity when connecting to the database, or is this something that has to be done in the default configuration?

Are there alternatives to MySQL that support the camelCaseConvention as per default on all platforms?

Edit

Ok, I feel a bit stupid now, I updated to mysql 5.5 and the camel-case convention is now supported, by lowering the entire name. It does not however preserve the camel-case, which is part of what I'm looking for.

share|improve this question
    
Why is it even a problem? You can still query using mixed-case, even if the DB doesn't care. –  Phil Feb 5 '13 at 0:16
    
It is quite a problem since many IDEs support data-source connections and provide code-completion for tables and columns. This function would only allow for pattern mixing. Even if the data-source does not care, it's a matter of readability and efficiency. –  Daniel Feb 5 '13 at 7:57
add comment

2 Answers

up vote 7 down vote accepted

The SQL standard defines that identifiers are not case sensitive (unless quoted). Your desire for CamelCase names conflicts with the standard and you'd better learn to live with it. Or you start quoting your identifiers and never forget to do so.

Most RDBMS' actually implement standard(-like) behavior. Even MySQL tries, lately, but it's very hard to break with established syntax rules.

Ressources

share|improve this answer
    
I guess I just have to learn to live with it. In the end it all comes down to personal preference. I guess I draw parallels between object design and schema design, which would be a nice thing - using the same naming conventions for tables as my java/php objects. –  Daniel Feb 5 '13 at 8:01
add comment

MySQL case sensitivity can come back to bite you (I am talking alligator, pitbull, great white shark) if you ever move data with foreign key constraints.

I had a rather horrific experience helping a client move MySQL data from a Linux box to a Windows box. None of the foreign key constraints were working. It almost drove me to the point of insanity until I caught on. The case sensitivity of the referenced column and table names turned out to be the issue.

The solution was to do perform two mysqldumps and load them as follows:

  • mysqldump the data only into a text file for data
  • mysqldump the schema only into a text file for the schema
  • edit all the constraints in the schema file to be all lowercase
  • load the schema file into the target DB
  • load the data file into the target DB

Q.E.D.

I wrote about this before : Is it possible to use the same directory for 2 MySQL servers?

share|improve this answer
    
Yes, I can see the problem, that was why I wondered if the case sensitivity could be defined when connecting. –  Daniel Feb 5 '13 at 8:02
    
The lower case options for mysql are server-level start options only. They are not configurable for client connections AFAIK. –  RolandoMySQLDBA Feb 5 '13 at 9:27
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.