Subject Re: [firebird-support] Upper case behaviour
Author Eugen.Konkov@aldec.com
I do not ask make up object names case-sensetive.
I ask to leave object names AS IS, not uppercase

>I agree with you that mixed case is more readable, but readability isn't a good reason
"HP makes up their code more readable and it have caused to reduce expenses by $21.5million per year!!!" (Grady and Van Slack 1994)
Readability is VERY GOOD reason, is not?

Another examles read at:
Steve McConnel "CODE COMPLETE"

I ask only to match 'myTable' and 'fieldID' when I query it by
select fieldID from myTable

and when table chema is:
create table "myTable" (
"fieldID" integer
);

So first of all you may try to match object name AS IS and then try to uppercase its name if you do not found any



----- Original Message -----
From: Svein Erling Tysvær
To: firebird-support@yahoogroups.com
Sent: Tuesday, December 04, 2007 4:09 PM
Subject: RE: [firebird-support] Upper case behaviour


A quick search on the Internet, led me to:

http://mail-archives.apache.org/mod_mbox/db-torque-user/200607.mbox/%3CF1EF69E69C1EED4FA3BB295B07664EEE52377C@...-ag.intern%3E

where it is written (amongst other things):
"According to a quick read of the SQL 99 standard, column names are supposed to be case insensitive unless they are delimited."

and http://kurafire.net/articles/sql-convention contains:

"Say no to CamelCase
CamelCase is an often adopted naming convention, used mainly in programming languages like Java and JavaScript. Its principle is simple: start every new word with a capital letter: camelCase, myObject, someFunction, etc. But CamelCase, or any uppercase in general, is not recommended for table and column names in SQL. Why, you wonder? Well, SQL databases tend to convert all identifiers (table/column names) to lowercase unless you wrap them in quotes. So even though you create a table called Authors, it'll be made as authors. Then, if you somehow end up moving your database to a server where the SQL system is compiled to be case-sensitive, and your code has Authors everywhere, it won't work anymore. Additionally, exporting your database scheme and moving it from Windows to Linux using certain tools comes at the risk that your names will all be lowercased along the way, which will - again - make your code (with CamelCase in it) stop working. Or imagine you have a column called authorId. The capital I for id can easily look like a lowercase L in many fonts, adding to the risk of confusing other people who have to work with your code. There are just too many small risks involved in using CamelCase, so try to avoid it and stick to lowercase."

Firebird deviates from the latter recommendation by making non-quoted column names UPPERCASE and not lowercase, but I'd say this is an implementation artifact of no importance that I'd be surprised if the SQL standard cared to mention.

I doubt you'll succeed in convincing the Firebird coders to leave the case as is and not uppercase it. I agree with you that mixed case is more readable, but readability isn't a good reason for breaking the SQL standard - even as a configuration option.

Sorry,
Set

-----Original Message-----
From: firebird-support@yahoogroups.com [mailto:firebird-support@yahoogroups.com] On Behalf Of Eugen.Konkov@...
Sent: 4. desember 2007 13:23
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Upper case behaviour

create table "myTable" (
"fieldID" integer
)

Now this FAILs:
select * from myTable

I think it will be usefull to allow server do not UPPERCASE myTable if it without quotes
at least in my case.

it will great if I will be able to configure server like this
# Upper case object names
#DEFAULTUPPERCASE= TRUE
DEFAULTUPPERCASE= FALSE

so when I run query
select * from myTable
server will not uppercase myTable and will use object names AS IS
for example, myTable in this case




[Non-text portions of this message have been removed]