Re: multiple tables as a foreign key - Mailing list pgsql-general

From John R Pierce
Subject Re: multiple tables as a foreign key
Date
Msg-id 4D61FAC2.8000500@hogranch.com
Whole thread Raw
In response to multiple tables as a foreign key  (matty jones <urlugal@gmail.com>)
List 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 by date:

Previous
From: Sachin Srivastava
Date:
Subject: Re: password
Next
From: John R Pierce
Date:
Subject: Re: password