Subject Re: Case Sensitivity on Indices
Author darryl_caillouet <darryl.caillouet@allte
Hey Martijn,

Thanks for information. I saw this technique mentioned in the Borland
article I linked to in my previous post. While it will solve the
problem, in my opinion, it makes the code very unportable.

Where I work, if over time an application grows to be very large, the
management sometimes wants to move the project to our large Oracle
servers. This isn't because they don't like open source databases. Its
just that the Oracle group has the personnel to support a database
24x7. If I were to ever tell them that to port my code I have to:

1. Drop a bunch of columns and change my code because I'm referencing
columns I don't need anymore.
2. Or they have to write Oracle triggers to cast fields to upper case
so we can index the data.

They would laugh at me and ask me why I had ever used that database in
the first place. Why didn't I use PostgreSQL or SAP DB instead? If I
knew that the database would stay Firebird forever, I could probably
work around this shortcoming. As it is, the inability of Firebird to
support case-insensitivy on a Linux box without some kind of hack
appears to make it unsuitable for my current project. Based on posts
in other newsgroups, I know other developers have dismissed Firebird
for the same reason.

Thanks,
Darryl

--- In ib-support@yahoogroups.com, "Martijn Tonies" <m.tonies@u...> wrote:
> Hi Darryl,
>
> A work-around that's being used _very_ often is quite simple:
>
> Create a "shadow" column and a trigger that fills this column with
> the upper-case equivalent of your "search" column.
>
> If you tend to search a lot on a column, for example, LAST_NAME
> create a U_LAST_NAME column and create an index on the column.
> Next, use WHERE U_LAST_NAME = 'TONI%' etc...
>
> Firebird Workbench even has a special dialog for this in the Table
> Editor - it creates the triggers for you!
>
>
> With regards,
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase & Firebird
> Firebird Workbench - the developer tool for Firebird
> Upscene Productions
> http://www.upscene.com
>
> "This is an object-oriented system.
> If we change anything, the users object."