| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.server -> Re: Implementation of boolean types.
"Ach C via DBMonster.com" <forum_at_DBMonster.com> wrote in message
news:513FA7AA5DEF9_at_DBMonster.com...
> Hi all,
> 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! )
> Any other ideas are highly appreciated.
> -Thanks in advance
>
>
> --
> Message posted via http://www.dbmonster.com
I would use a CHAR(1) column with a check constraint ('0' or '1').
You could then link the table to a small lookup table with the description
of the 0 and 1.
0 = male
1 = female
Matthias Received on Wed Jul 13 2005 - 14:59:21 CDT
![]() |
![]() |