Re: 'image' table with relationships to different objects

From: Michael Lourant <lourant(at)gmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: 'image' table with relationships to different objects
Date: 2010-02-09 11:34:10
Message-ID: 5ac667b81002090334u60d9f56dlf06af62e913da547@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)apartia(dot)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(at)postgresql(dot)org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Richard Huxton 2010-02-09 11:59:14 Re: 'image' table with relationships to different objects
Previous Message Louis-David Mitterrand 2010-02-09 07:49:09 'image' table with relationships to different objects