Re: Best practices for "Gender Column"

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 7 Jul 2009 22:24:50 +0100
Message-ID: <EMidnTjRVqyCIM7XnZ2dnUVZ8jKdnZ2d_at_brightview.co.uk>


"jose" <josedial_at_gmail.com> wrote in message news:c00970a7-a56c-4066-8782-ccecdb81ddea_at_d32g2000yqh.googlegroups.com...
> This days, I'm participating in the design of a new application for a
> Biotechnology company. I found the following:
> -In some applications they use for (Gender/sex column) NUMBER(1) and
> this could be Null because in some cases they don't know the Gender
> until they get the genotype, but in this applications the values are
> (1 = Male , 2 = Female and Null ), the problem with this solution is
> that in some cases when the people is reading the information always
> is asking 1 is for male o for female ?
> -In the new application I suggest to use VARCHAR2(1) for this column
> and this must be NOT NULL, and the possible values must be M=Male
> F=Female and U= Unknown. I think is better use a value against a Null
> because of the indexes, I mean in case we decided to index by this
> column the null values will never be indexed.
>
> I'm posting this to here any comments, thanks, Uriel.

You could follow the ISO standard which I believe is:

    0 Unknown
    1 Male
    2 Female
    9 Not Applicable

I don't think the ISO standard has a value for hermaphrodite, though - which might be important in bio-sciences. Nor does it address trans-gender possibilities - which might be relevant to social welfare applications.

-- 
Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com

Author: Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html
Received on Tue Jul 07 2009 - 16:24:50 CDT

Original text of this message