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

From Gregory Stark
Subject Re: My honours project - databases using dynamically attached entity-properties
Date
Msg-id 873b47n7w0.fsf@stark.xeocode.com
Whole thread Raw
In response to Re: My honours project - databases using dynamically attached entity-properties  (mark@mark.mielke.cc)
List pgsql-hackers
<mark@mark.mielke.cc> writes:

> On Wed, Mar 14, 2007 at 03:25:48PM +0000, Gregory Stark wrote:
>> <mark@mark.mielke.cc> writes:
>> > On Wed, Mar 14, 2007 at 02:28:03PM +0000, 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.
>> > Where is the boolean above? It is M:N, with each having whatever data
>> > is required.
>> No, the above schema can only show whether a patient has or doesn't have a
>> symptom. There is nowhere to store *where* the pain, inflammation, swelling,
>> aneurism, etc is, or how severe it is, or when it occurred, etc.
>
> What do you think the '...' is in the symptom table? :-)

Ah, I did in fact miss that. So then this is just a standard EA schema. I
thought you were on the other side of the debate?


--  Gregory Stark EnterpriseDB          http://www.enterprisedb.com


pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: autovacuum next steps, take 3
Next
From: David Fetter
Date:
Subject: Re: My honours project - databases using dynamically attached entity-properties