Subject Re: [firebird-support] unique index problem: 'emails' table
Author David Garamond
Helen Borrie wrote:
> 1) the "@" symbol makes absolutely no difference to the uniqueness of your
> local + host combination.

Yes it does. Try local="ab", host="c" vs. local="a", host="bc". The
second will be incorrectly rejected by the UNIQUE(local,host) constraint
but correctly accepted by UNIQUE(local,ampersand,host).

> 3) you don't need the computed column in storage (see example below)

Yes, I put it there just for convenience. If proven unused, it will be
removed.

> Depending on how well you parse input, you might need to maintain an
> indexed uppercase proxy column for the two columns and make search
> conditions case-insensitive. The practice some people have of using mixed
> case in their email addresses is another major reason not to use them as
> keys. They are *highly* non-atomic.

Thanks, Helen. I know about this standard technique (from you actually
:). But I plan to use a case-insensitive index.

--
dave