Re: Critique needed for contact-DB draft

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: "Felix E(dot) Klee" <felix(dot)klee(at)inka(dot)de>
Cc: Steve Crawford <scrawford(at)pinpointresearch(dot)com>, pgsql-novice(at)postgresql(dot)org
Subject: Re: Critique needed for contact-DB draft
Date: 2004-07-15 18:35:03
Message-ID: 20040715183503.GB18875@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Thu, Jul 15, 2004 at 16:25:54 +0200,
"Felix E. Klee" <felix(dot)klee(at)inka(dot)de> wrote:
> The new draft:
>
> "Major" tables:
> ORGANIZATIONS:
> contact_id, offers, demands, description, type (person|non-person),
> type_id (a person_id or a non-person_id)

You probably want to have two separate type_id fields and use constraints
to enforce exactly one of them being NULL. They should both REFERENCE the
appropiate table. This makes the type field redundant, but if you find it
simpler to have it then adjust the above constraints to make it consistant
with which type_id field is not NULL.

>
> PERSONS:
> person_id, surname, given_names, pseudonyms, prefix, suffix, sex (M|F)
>
> NON-PERSONS:
> non-person_id, name, type (company|non-profit|...)

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Bruno Wolff III 2004-07-15 18:52:38 Re: Critique needed for contact-DB draft
Previous Message Felix E. Klee 2004-07-15 18:32:52 Re: postgres account default password