<[EMAIL PROTECTED]> writes:

> On Wed, Mar 14, 2007 at 03:25:48PM +0000, Gregory Stark wrote:
>> <[EMAIL PROTECTED]> writes:
>> > On Wed, Mar 14, 2007 at 02:28:03PM +0000, Gregory Stark wrote:
>> >> "David Fetter" <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to