db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael J. Segel" <mse...@segel.com>
Subject Re: Unique constraints on multiple fields with one nullable
Date Thu, 27 Oct 2005 18:18:10 GMT
On Thursday 27 October 2005 11:01, Rick Hillegas wrote:
> Thanks, Michael. You are correct, Derby, like DB2, finesses this issue
> by not allowing nullable columns in unique constraints. I have closed
> this bug.
>
> Cheers,
> -Rick
>
NP,

But Dan's reply is an interesting one.

What Sybase did was create a Schrodinger's Cat.
(See http://whatis.techtarget.com/definition/0,,sid9_gci341236,00.html for a 
definition... ;-)

This is actually a bug in Sybase. 
(Note: Bug because by allowing multiple tuples where n-1 of the constraint 
columns match and the nth column is NULL, the guaranteed uniqueness fails. 
[Where n = number of columns in the table constraint] )

With respect to constraints in Derby...

You really need to consider allowing NULLs in columns that are part of a table 
constraint. In fact, you should really reconsider how you handle constraints 
in general.

But hey, what do I know?  Meow. ;-)

-G
-- 
Michael Segel
Principal
MSCC
(312) 952-8175

Mime
View raw message