Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 37569 invoked from network); 15 Jan 2008 23:24:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jan 2008 23:24:43 -0000 Received: (qmail 98982 invoked by uid 500); 15 Jan 2008 23:24:32 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 98959 invoked by uid 500); 15 Jan 2008 23:24:32 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Delivered-To: moderator for derby-user@db.apache.org Received: (qmail 98091 invoked by uid 99); 15 Jan 2008 23:23:12 -0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of Sai.Pullabhotla@jmethods.com designates 65.212.180.92 as permitted sender) Message-Id: <200801152322.m0FNMkSf007668@pyramid-03.kattare.com> Reply-To: From: "Sai Pullabhotla" To: Subject: Case-Insensitive Unique Constraint Date: Tue, 15 Jan 2008 17:22:33 -0600 Organization: jMethods, Inc. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Thread-Index: AchXzYFfxigJIndOTL6DoktsBaqqpA== X-Virus-Checked: Checked by ClamAV on apache.org Hello every one, I'm in the process of porting an application from HSQLDB to Derby. I ran into an issue with defining unique constraints on character (CHAR and VARCHAR) data IGNORING the case. HSQLDB has a proprietary data type called "varchar_ignorecase" and we have used that extensively. However, there is no such thing in Derby that could find. So my questions are: Is there a way to create a unique constraint/index which ensures the uniqueness of data IGNORING the case? What I mean by above is - trying to insert "derby" when "Derby" already exists in the table should produce a constraint violation error. I've gone through the documentation and Googled for several hours, but could not find anything to accomplish this. If there is no direct way to do this, what would be the best alternative/workaround? Any help would be greatly appreciated. Regards, Sai Pullabhotla President jMethods, Inc. Phone: +1 (402) 408-5753 Fax: +1 (402) 408-6861 www.jMethods.com