Re: Implementation of boolean types.

From: Gene Wirchenko <genew_at_ucantrade.com.NOTHERE>
Date: Wed, 13 Jul 2005 10:27:00 -0700
Message-ID: <5ciad1plq8hr6jo14g9e2o6tj9tlo07388_at_4ax.com>


On Wed, 13 Jul 2005 07:36:18 GMT, "Ach C via DBMonster.com" <forum_at_DBMonster.com> wrote:

> I have seen many databases that tables with columns such as IsMale,IsFemale,
>IsNull,Is...
> All these were somekind of boolean type with yes/no or true/false or 1/0
>values.In DBMSs that supports
>boolean or bit data type it can be implemented naturaly but in Oracle that
>does not have boolean or
>bit,people usually use number(1) or char(1) for this purpose.
> My question: Is this design OK in your opinion? I personally think that this
>should be design using a relationship with other tables such as HumanSex or...
>for scalability reasons and so on (Not in fe/male
>situation! )

     What scalability? "Have you ever been convicted of a criminal offence for which you have not received a pardon?" The answer is yes or no. What need of scalability?

     If there is a real possibility of having more than two choices, then maybe another table, but there are cases of multiple choice that are stable. Marital status is one of these.

     Sex of individual is not limited to two choices. In a medical database, it might be very important to specify the sex accurately. 1) While rare, hermaphroditism does exist. 2) There is also androgen insensitivity syndrome where the person is genetically male but somatically female.

> Any other ideas are highly appreciated.

Sincerely,

Gene Wirchenko Received on Wed Jul 13 2005 - 19:27:00 CEST

Original text of this message