473,385 Members | 1,312 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

case sensative issues?

I notice that on unix the default for case sensative is off which means
tables created with upper case need to be referenced in sql as upper
case. It seems that if the case sensative variable is set to 1, then
select emp works as well as select EMP. Is there any reason not to set
it to 1? Also, is there an ansi standard for this? I could not find a
reference to one.

Thanks,

-Peter

(reference I found to case sensitivity)
http://dev.mysql.com/doc/mysql/en/na...nsitivity.html

--
Peter Kellner
http://peterkellner.net
Aug 15 '05 #1
3 1535
Peter Kellner (pe***@peterkellner.net) wrote:
: I notice that on unix the default for case sensative is off which means
: tables created with upper case need to be referenced in sql as upper
: case. It seems that if the case sensative variable is set to 1, then
: select emp works as well as select EMP. Is there any reason not to set
: it to 1? Also, is there an ansi standard for this? I could not find a
: reference to one.

Are you talking about "lower_case_table_names"?

I'm not quite sure what you mean when you say "on unix the default for
case sensative is off".

On unix the lower_case_table_names has the value 0, which is one of three
settings (i.e. not just "on" or "off"). The word "off", if you did use
it, would refer to whether your queries will be modified to force them to
have lower case characters. In that interpretation, 0 means "do not
modify my queries", which is not really the same thing as being case
sensitive.

Indeed the table name on unix is always case sensative, since they are
stored in a file of that name. The lower_case_table_names variable
doesn't change that. It just controls the modification of your queries to
force them to use lower case characters.

So, if the table was originally defined using upper case characters then
the modified query would not be able to access the table.

On the other hand, if you set the variable to 1 before defining anything,
or carefully defined everything in lowercase initialy, then everything
will be created with lower case names, so a modified query will work.

I do not know the ansi standards about case sensitivity for table names,
but I would be surprised if a feature such as that controlled by
lower_case_table_names is covered by the standard.

The bottom of the page you mention has at least one user's feedback with
warnings about using this feature. However another lesson from that
feedback might be that you should turn the setting to 1 to force
everything to be lowercase right from the start.

--

This space not for rent.
Aug 15 '05 #2
This followup was posted to mailing.database.mysql

In article <42******@news.victoria.tc.ca>, yf***@vtn1.victoria.tc.ca
says...
Peter Kellner (pe***@peterkellner.net) wrote:
: I notice that on unix the default for case sensative is off which means
: tables created with upper case need to be referenced in sql as upper
: case. It seems that if the case sensative variable is set to 1, then
: select emp works as well as select EMP. Is there any reason not to set
: it to 1? Also, is there an ansi standard for this? I could not find a
: reference to one.

Are you talking about "lower_case_table_names"?

Sorry for not being more clear. You assumed correctly what I was
looking for. I'm inclined to change the setting to force lowercase,
however since this is not the default behavior it makes me nervous to
change it.

--
Peter Kellner
http://peterkellner.net
Aug 15 '05 #3
Peter Kellner (pe***@peterkellner.net) wrote:
: This followup was posted to mailing.database.mysql

: In article <42******@news.victoria.tc.ca>, yf***@vtn1.victoria.tc.ca
: says...
: > Peter Kellner (pe***@peterkellner.net) wrote:
: > : I notice that on unix the default for case sensative is off which means
: > : tables created with upper case need to be referenced in sql as upper
: > : case. It seems that if the case sensative variable is set to 1, then
: > : select emp works as well as select EMP. Is there any reason not to set
: > : it to 1? Also, is there an ansi standard for this? I could not find a
: > : reference to one.
: >
: > Are you talking about "lower_case_table_names"?
: >
: Sorry for not being more clear. You assumed correctly what I was
: looking for. I'm inclined to change the setting to force lowercase,
: however since this is not the default behavior it makes me nervous to
: change it.
I have no experience to share on this.

My guess is that if you use this setting from day 0 of your database then
you won't have a problem. Every item for which this would make a
difference will be forced to use lowercase.

If you then turned off the setting then you could still access everything
by writing your queries in lowercase.

That's my reading of it, but it's not based on experience.
--

This space not for rent.
Aug 15 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
by: DJ | last post by:
Can someone tell me the library call that converts strings to lower case or retrns a new string that is lower case of the original, thanks im using <string> David
2
by: Tom | last post by:
I have data entered in Uppercase. I need to view it in lower case in a continuous form. Any ideas???
4
by: J.Marsch | last post by:
I notice that when I generate various guids, they appear to have a mix of upper and lowercase letters. Is the uniqueness of a guid case-sensitive? In other words, if I generate a guid, and...
110
by: alf | last post by:
Hi, is it possible that due to OS crash or mysql itself crash or some e.g. SCSI failure to lose all the data stored in the table (let's say million of 1KB rows). In other words what is the worst...
8
by: Chris Noble | last post by:
I need to check whether a particular user is already a member of an Active Directory Security Group. The following code extract works but only if the user distinguished name is exactly the same...
7
by: Adrian | last post by:
Hi, I want a const static std::set of strings which is case insensitive for the values. So I have the following which seems to work but something doesnt seem right about it. Is there a better...
2
by: arunmenon | last post by:
Dear Folks, I have an query which something looks like this select ILTRDJ AS YEAR, DATEPART(MONTH,ILTRDJ) AS MONTH, FMSTR.IMITM AS CODE,FMSTR.IMSRP6_UDC AS DESCRIPTION, FTRANS.ILDCT = CASE...
1
by: =?Utf-8?B?dGltdHJhcHA=?= | last post by:
I am using Windows XP SP2. I have noticed that a file saved with lower case letters will be changed to upper case at some point. I first noticed this when using bluebeam PDF software to make PDF's...
32
by: Bill H | last post by:
I wouldn't consider myself a newbie to PHP since I have never written one line of code in it (am a perl guy myself), but part of a team I am working with is writing some php interfaces into a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.