Re: 'image' table with relationships to different objects - Mailing list pgsql-sql

From Jasen Betts
Subject Re: 'image' table with relationships to different objects
Date
Msg-id [email protected]
Whole thread Raw
In response to 'image' table with relationships to different objects  (Louis-David Mitterrand <[email protected]>)
List pgsql-sql
On 2010-02-09, Louis-David Mitterrand <[email protected]> wrote:
> Hello,
>
> In my database I have different object types (person, location, event,
> etc.) all of which can have several images attached.

can one image be several people?

can one image be both event and location?

> What is the best way to manage a single 'image' table with relationships
> to (potentially) many different object types while keeping referrential
> integrity (foreign keys)?

probably several join tables 
image_location image_person image_event
with uniques and cascades where needed.


pgsql-sql by date:

Previous
From: Adrian Klaver
Date:
Subject: Re: plpgsql loop question
Next
From: Louis-David Mitterrand
Date:
Subject: "left join" not working?