Re: Conditional Relationships ?

From: Paul Thornett <pault_at_terrigal.net.au>
Date: Tue, 31 Dec 2002 14:39:44 +1100
Message-ID: <epMP94HsCHA.1676_at_TK2MSFTNGP10>


> On 30 Dec 2002 12:19:33 -0800, 71062.1056_at_compuserve.com (--CELKO--)
> >to get a result table like this
> >
> >Result
> >male prostate female pregnancy
> >==================================
> >'male' no NULL NULL
> >'male' no NULL NULL
> >'male' yes NULL NULL
> >'male' yes NULL NULL
> >NULL NULL 'female' no
> >NULL NULL 'female' no
> >NULL NULL 'female' yes
> >NULL NULL 'female' yes

"Bob Hairgrove" <rhairgroveNoSpam_at_Pleasebigfoot.com> wrote in message news:3e10cea8.676813_at_news.webshuttle.ch...
>
> But of what actual USE is such a result set in real life?? There is
> usually a good reason for putting things in separate tables...

And in _real life_, I'd probaby define a single table as:

CREATE TABLE SingleSex
  (Sex CHAR(1), ConditionType TinyInt, Condition TinyInt)

INSERT SingleSex VALUES('M', 1, 0)
INSERT SingleSex VALUES('M', 1, 1)
INSERT SingleSex VALUES('F', 2, 0)
INSERT SingleSex VALUES('F', 2, 1)

-- 
Paul Thornett
Received on Tue Dec 31 2002 - 04:39:44 CET

Original text of this message