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: (view raw, whole thread or download thread mbox)
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:
>     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-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-2017 The PostgreSQL Global Development Group