Re: Case sensitive/insensitive?

From: Beth J. Katcher <katcher_at_a1.tch.harvard.edu>
Date: 1995/07/19
Message-ID: <3uj15t$6m4_at_netope.harvard.edu>#1/1


magick_at_metronet.com (Elaine Mohrle) wrote:
>mary_at_mitra.com (Mary E. Hunt) wrote:
>
>>. . .
>>What is the standard for SQL databases?? Case sensitive on character
>>fields or case insensitive?
>
>why not force everything to uppercase regardless of what the user
>inputs. enforce it with a check constraint on the column.
>

The above suggestion works, but of course you lose the case as the user entered it. If it's important to retain the case in the manner that the user entered it, then you could use another column in the table where everything is forced to upper or lower case and index on that. Thus if you had a last_name column which allows mixed-case entry, you could have a last_name_idx column which forces it to upper case. Then index and query on that column but display the first column.

Every database I've worked with (Ingres, Informix, Oracle, Xbase) was case sensitive, although the Xbase languages handled it a little better by allowing you to index on an expression so you could index on UPPER(last_name) rather than creating a second column.

Beth Received on Wed Jul 19 1995 - 00:00:00 CEST

Original text of this message