Re: 'image' table with relationships to different objects

Поиск
Список
Период
Сортировка
От Jasen Betts
Тема Re: 'image' table with relationships to different objects
Дата
Msg-id hl0oa2$l1g$6@reversiblemaps.ath.cx
обсуждение исходный текст
Ответ на 'image' table with relationships to different objects  (Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org>)
Список pgsql-sql
On 2010-02-09, Louis-David Mitterrand <vindex+lists-pgsql-sql@apartia.org> 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 по дате отправления:

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: plpgsql loop question
Следующее
От: Louis-David Mitterrand
Дата:
Сообщение: "left join" not working?