Re: multiple tables as a foreign key

Поиск
Список
Период
Сортировка
От John R Pierce
Тема Re: multiple tables as a foreign key
Дата
Msg-id 4D61FAC2.8000500@hogranch.com
обсуждение исходный текст
Ответ на multiple tables as a foreign key  (matty jones <urlugal@gmail.com>)
Список pgsql-general
On 02/20/11 2:40 PM, matty jones wrote:
> If I were to create three separate attributes for each of
> the separate titles in the seriestitle table then reference those
> attributes from their respective tables that would produce errors I
> believe, because a foreign key can't be null and not every attribute
> will have a value in every tuple.

a foreign key reference most certainly can be NULL, unless you've
declared it NOT NULL.

The correct answer is as many separate attributes as there are different
tables you want to reference, some of which might be NULL.



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

Предыдущее
От: Sachin Srivastava
Дата:
Сообщение: Re: password
Следующее
От: John R Pierce
Дата:
Сообщение: Re: password