Re: My honours project - databases using dynamically attached entity-properties - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: My honours project - databases using dynamically attached entity-properties
Date
Msg-id 45F8158E.50402@dunslane.net
Whole thread Raw
In response to Re: My honours project - databases using dynamically attached entity-properties  ("Joshua D. Drake" <jd@commandprompt.com>)
List pgsql-hackers
Joshua D. Drake wrote:
> Gregory Stark wrote:
>   
>> "David Fetter" <david@fetter.org> writes:
>>
>>     
>>> CREATE TABLE symptom (
>>>     symptom_id SERIAL PRIMARY KEY, /* See above. */
>>>     ...
>>> );
>>>
>>> CREATE TABLE patient_presents_with (
>>>     patient_id INTEGER NOT NULL REFERENCES patient(patient_id),
>>>     symptom_id INTEGER NOT NULL REFERENCES symptom(symptom_id),
>>>     UNIQUE(patient_id, symptom_id)
>>> );
>>>       
>> I'm just glad I don't have your doctor. I hope mine doesn't think symptoms are
>> all boolean values.
>>     
>
> With a unique across (patient_id,symptom_id) you could have a single
> patient with as many unique symptoms as could be listed.
>
>
>
>   

I think Greg is suggesting that the table needs to be augmented with, 
say, a severity field.

cheers

andrew


pgsql-hackers by date:

Previous
From: Csaba Nagy
Date:
Subject: Re: My honours project - databases using dynamically attached entity-properties
Next
From: mark@mark.mielke.cc
Date:
Subject: Re: My honours project - databases using dynamically attached entity-properties