many to one of many modeling question

Поиск
Список
Период
Сортировка
От Kevin Hunter
Тема many to one of many modeling question
Дата
Msg-id 478261CA.5090503@earlham.edu
обсуждение исходный текст
Ответы Re: many to one of many modeling question  (brian <brian@zijn-digital.com>)
Re: many to one of many modeling question  (David Fetter <david@fetter.org>)
Список pgsql-general
Hi List,

I have multiple objects to which I'd like to associate comments.  I'd
like this to be a many to one relationship, so that each object can have
many different comments.  The issue is how to have one comment table.
One method that has been proposed is to have a third table which stores
to what object type a comment belongs, but I don't like this because the
foreign key relationships then wouldn't be maintained by the database.
The only way that I'm able to think of at the moment is multiple columns.

Is there a clever/clean way of having the comments foreign key into the
multiple tables?

Thanks,

Kevin

В списке pgsql-general по дате отправления:

Предыдущее
От: Jean-Michel Pouré
Дата:
Сообщение: calculating shared data memory space
Следующее
От: Shelby Cain
Дата:
Сообщение: Re: PhpBB 3.x query review