Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 5962 invoked from network); 7 Dec 2006 15:20:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Dec 2006 15:20:46 -0000 Received: (qmail 91390 invoked by uid 500); 7 Dec 2006 15:20:52 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 91360 invoked by uid 500); 7 Dec 2006 15:20:52 -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 Received: (qmail 91349 invoked by uid 99); 7 Dec 2006 15:20:52 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 07:20:52 -0800 X-ASF-Spam-Status: No, hits=2.3 required=10.0 tests=DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [68.230.240.36] (HELO eastrmmtao03.cox.net) (68.230.240.36) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Dec 2006 07:20:37 -0800 Received: from eastrmimpo01.cox.net ([68.1.16.119]) by eastrmmtao03.cox.net (InterMail vM.6.01.06.03 201-2131-130-104-20060516) with ESMTP id <20061207152016.DCFP28701.eastrmmtao03.cox.net@eastrmimpo01.cox.net> for ; Thu, 7 Dec 2006 10:20:16 -0500 Received: from Desktop ([68.12.22.57]) by eastrmimpo01.cox.net with bizsmtp id vrKE1V00c1Du0dQ0000000; Thu, 07 Dec 2006 10:19:19 -0500 Message-ID: <003a01c71a13$3597a560$0a00a8c0@Desktop> From: "Bayless Kirtley" To: "Derby Discussion" References: <20061207140718.70677.qmail@web31903.mail.mud.yahoo.com> Subject: Re: Best choice for column's data type to represent boolean data Date: Thu, 7 Dec 2006 09:20:07 -0600 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Virus-Checked: Checked by ClamAV on apache.org Is there reason to think the next version may support Boolean data type? If so then what about Java Objects? Bayless ----- Original Message ----- From: "Leslie Software" To: "Derby Discussion" Sent: Thursday, December 07, 2006 8:07 AM Subject: Re: Best choice for column's data type to represent boolean data Thanks for the advice I was leaning towards the numeric solution but using 'T' / 'F' as a visual clue makes a lot of sense. After all until we do have a new boolean data type that visual clue is all we have. I am already looking forward to the next version:-) Ian ----- Original Message ---- From: "derby@segel.com" Well the best practice would be to extend the known data types to include a Boolean. ;-) There are two options. You can create a CHAR(1) column, or if the database you could do a byte/short column as well. If you use a CHAR(1) you could represent the Boolean as either ('T' or 'F') or ('Y','N'). You would also want to put a check constraint on the column only allowing a true and a false value. You could also use a 1 or a 0 in the column as well and provide the same check constraint, however using a T/F or Y/N provides a visual cue that would be missing from a numeric solution. HTH -G __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com