Pavel said:
>Hi, all.
>Traditionally, SQL databases are case insensitive, or at least have an
>option to behave this way. Sqlite is case sensitive and this fact is
>introduced in a lot of places in sources. Having case-insensitive
>sorting and matching seem to be extremely useful thing to me (in
>business domain where one have to deal with names, addresses etc). Any
>opinions?
>Yours, Pavel

Personally, I prefer that databases *are* case-sensitive by default, as this matches 
how most programming languages work. 

If I do a normal comparison between two strings in a programming language, they match 
only if the case is the same.  It gives me plenty of headaches if the database behaves 
differently, and I can't be certain if matches returned by a database actually are 
matches.

Also, case-sensitive comparisons (basis for both matching and sorting) are 
considerably faster and use less memory than non-sensitive ones, since with the latter 
one has to convert the string on each side to either an upper or lower case 
representation, so that the normal numerical comparison of the strings match, and with 
the former, no conversion is needed.

Also, in these days of increasing internationalization, it is simpler to do 
case-sensitive by default since that's what all the world's other character sets and 
our own non-letter symbols do, to my knowledge.

Now I do recognize the value of case-insensitive comparisions, but I think that this 
should be done as a type of extension functionality rather than in core functionality. 

What I mean is, have a different syntax to specify case-insensitive matching, much in 
the way that "like '%abc%'" is used when we want to match just part of a string.

Also or alternately, treat case-insensitive operations as a locale-related thing, much 
as parts of a database schema can be configured to do things in a certain way, such as 
sorting, based on the user's locale.

So case-sensitive default actions all around are the simplest, fastest, take the least 
code, are the most reliable, and technically most standard way of doing things.  So I 
see SQLite doing sensitive by default as a good thing.

-- Darren Duncan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to