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

From Michael Lourant
Subject Re: 'image' table with relationships to different objects
Date
Msg-id 5ac667b81002090334u60d9f56dlf06af62e913da547@mail.gmail.com
Whole thread Raw
In response to 'image' table with relationships to different objects  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
List pgsql-sql
Hi There,

Maybe a table MEDIA_OBJECT with a ID column that will be exported as
FK to other tables and as many columns as media types you want to
store or a single column where you'll store the bytes of your media
file.

Hope it works!

__
Michael Lourant
"Let's warm them all..."


2010/2/9 Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>:
> Hello,
>
> In my database I have different object types (person, location, event,
> etc.) all of which can have several images attached.
>
> 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)?
>
> Thanks,
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>


pgsql-sql by date:

Previous
From: Louis-David Mitterrand
Date:
Subject: 'image' table with relationships to different objects
Next
From: Richard Huxton
Date:
Subject: Re: 'image' table with relationships to different objects