Re: Foreign key to a view (UNION of two or more tables), any alternative?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Foreign key to a view (UNION of two or more tables), any alternative?
Дата
Msg-id 20050617194939.GA9670@wolff.to
обсуждение исходный текст
Ответ на Foreign key to a view (UNION of two or more tables), any alternative?  (Jose Gonzalez Gomez <jgonzalez.openinput@gmail.com>)
Ответы Re: Foreign key to a view (UNION of two or more tables), any alternative?
Список pgsql-general
On Fri, Jun 17, 2005 at 14:35:01 +0200,
  Jose Gonzalez Gomez <jgonzalez.openinput@gmail.com> wrote:
>
> The problem comes when you have questions that may be not applicable
> (8), or optional (doesn't know, doesn't answer) (9). The easy solution
> would be to have four tables:
>
> yes_no
> yes_no_not_applicable
> yes_no_optional
> yes_no_not_applicable_optional

How about having a table with the valid codes for each question?
This should be relatively easy maintain and you can easily set up
a foreign key reference to this table to enforce integrity.

В списке pgsql-general по дате отправления:

Предыдущее
От: Peter Fein
Дата:
Сообщение: Error column "sys" does not exist
Следующее
От: Geoffrey
Дата:
Сообщение: Re: Making the DB secure