db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anurag Shekhar (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-2212) Add "Unique where not null" to create index
Date Wed, 07 Nov 2007 18:08:51 GMT

    [ https://issues.apache.org/jira/browse/DERBY-2212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540822
] 

Anurag Shekhar commented on DERBY-2212:
---------------------------------------

>In my opinion ithe functional specification must point that for time
beeing implementation depends on appropriate extension of the behavior
of the unique index and refer to task of exposing of this new behavior
to the user.

>One more point - this change for sure will affect optimizer behavior and
will require modification in it, but specification completely miss this
point.


functional spec shouldn't have any reference index specially because it talks about the feature
related to unique constraint. How it is implemented shouldn't be  mentioned in this document.
(Please check Mike's feed back on the first version)

>There are still hordes of typos (both in the functional specification
and your last comment). I'm really afraid that patch source would be
done with the same level of accuracy :(

Please don't be afraid, anything committable goes through a really strict process before being
part of the source code. Chances of bad code finding a place in code base is really really
low. 

thanks for pointing out the mistakes I will upload a new version.
 



> Add "Unique where not null" to create index
> -------------------------------------------
>
>                 Key: DERBY-2212
>                 URL: https://issues.apache.org/jira/browse/DERBY-2212
>             Project: Derby
>          Issue Type: Improvement
>          Components: SQL
>    Affects Versions: 10.2.1.6
>            Reporter: Oleksandr Alesinskyy
>            Assignee: Anurag Shekhar
>         Attachments: derby-2212preview.diff, derby-2212preview2.diff, FunctionalSpec.html,
FunctionalSpecV3.html, FunctionlaSpecv2.html
>
>
> Derby prohibits creation of unique constraints on nullable colums (as well if only some
columns in the constraint list are nullable) and treat nulls in unique indexes as normal values
(i.e. only one row with null values in indexed columns may be inserted into the table). This
bahavior is very restrictive, does not completely comply with SQL standards (both letter and
intent) as well as with business needs and intending meaning of NULL values (2 null values
are not considered as equal, this comparision shall return NULL, and for selection criteria
boolean null is treated as FALSE).
> This behavior, as far as I can see, is modelled after DB2 (and differs from behavior
of most other major databases, like SyBase, Oracle, etc.).
> But even DB2 provide some means to alleviate these restrictions, namely "UNIQUE WHERE
NOT NULL" clause for CREATE INDEX statement.
> It will be very good if such "UNIQUE WHERE NOT NULL" clause will be introduced in Derby.
> Regards,
> Oleksandr Alesinskyy

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message