Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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

pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group