Re: Critique needed for contact-DB draft
| От | Bruno Wolff III | 
|---|---|
| Тема | Re: Critique needed for contact-DB draft | 
| Дата | |
| Msg-id | 20040715183503.GB18875@wolff.to обсуждение исходный текст | 
| Ответ на | Re: Critique needed for contact-DB draft ("Felix E. Klee" <felix.klee@inka.de>) | 
| Список | pgsql-novice | 
On Thu, Jul 15, 2004 at 16:25:54 +0200, "Felix E. Klee" <felix.klee@inka.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|...)
В списке pgsql-novice по дате отправления: