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

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org/

Reply via email to