Subject Re: [firebird-support] Use of double quoted names in Firebird
Author Fabricio Araujo
On Sun, 20 Mar 2005 11:08:41 +0100, Kjell Rilbe wrote:

>
>As I see it, the problem is that when a person who doesn't have English
>as his native toungue, he has to do some kind of translation between the
>name he actually wants and the name he can use. This translation has to
>follow some kind of standard.

It's my case also, my native tongue is Portuguese. Is very rich in
various types of accents. And no, I don't use quoted identifiers with
accents
or mixed case.

>
>In your examples, you've apparently chosen not to translate the words to
>English but simply strip them of accents and convert them to uppercase.

Yes. Works like a charm. And without the hassles of quoted identifiers.
So I can query it as:

select * from Clientes
select * from ClIeNtEs
Select * from clientes
Select * from CLIENTES
etc.
etc.
etc.
All of them are valid queries...


>But there are several cases when this wouldn't work very well, because
>it would alter the original word into a completely different one with a
>completely different meaning. For example, in Swedish "hår" means hair
>and "har" mean "has". Not even the same part of speech (noun vs. verb).
>I can give you endless numbers of worse cases, where the risk of
>confusion would be a lot worse.
>Accents and letter decorations aren't there just for fun, they actually
>mean something. Removing them removes information.

Here the cases where it would create such a confusion
is veeeeeeery litle. And even in that cases, I can create a good
name without letter decoration, accents or obligation to follow
a determined case.

>As an alternative, you could choose to translate all identifiers to
>English. But in many situations this wouldn't be very good either, due
>to insufficient knowledge of the English language on the part of the
>developers. I've seen many examples of this. Again, the result is confusion.

Confusion? Confusion is your boss saying the SP doesn't work and
his program is not working after the request he done - change the
name of return field... Because I commited a typo error, a space more
where is not the place. Or in the middle I missed the case of one
letter.
If the identifier is not quoted I had not to pass 2 hours seeking
the code to realise of that cursed blank space - because the returning
field will work.
Quoted identifiers is just trouble, rope to hang-on yourself.
I run from it like the plague.

>Is this good?
>
>The simplest way of doing this would be for the developer to use the
>word/name he really wants, without conversion. To use that exact same
>name, same case, same accents, same everything, in every place shouldn't
>be a problem. Provided that all interfacing systems and applications do
>support unicode of course, which I think is only a matter of time.

In theory, maybe. In my experience, however, is just only a
infinite source of headaches.

>May I also mention that if I'm not mistaken, Delphi 2005 supports
>unicode in source code and now allows identifiers like "Hår" and
>"Automóvel". How it handles the dated "feature" of case unsensitivity, I
>do not know.

If so, is just a aberration.

(And believe me, I'm a die-hard Delphi fan)

Keep it simple. Case and accent insensitive code is simple.
Simple to read. Simple to maintain. Simple to understand.
Do not induce error on new DBAs.

It's so simple that don't cause trouble even when you mix
the case on the same query...