On Mon, Oct 06, 2008 at 09:25:09AM -0400, Dan McFadyen wrote:
> Hello,
> 
> Simplest way I can think of is create 3 relation tables, a person/image
> table, location/image table and event/image table.
> 
> Each is just made up for 2 foreign keys to the first ID and image ID,
> using both as the PK for the table.

On Mon, Oct 06, 2008 at 09:30:41AM -0400, Dave Steinberg wrote:
> The typical way to do this would be to have your image table be just  
> about images, and then to isolate the relationship information into  
> mapping tables.  Those would look like:
>
> image <=> people
> (image_id, person_id), with the primary key being the pair of columns.  
> In SQL, roughly:

Thanks Dan and Dave,

you suggested the same solution which seems the most reasonable.

-- 
http://www.lesculturelles.net

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to