--- On Fri, 1/11/08, David Fetter <[EMAIL PROTECTED]> wrote:
> > 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
> databa
On Mon, Jan 07, 2008 at 12:30:50PM -0500, Kevin Hunter wrote:
> 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
On Mon, Jan 07, 2008 at 02:32:26PM -0500, Kevin Hunter wrote:
> Something along the lines of
>
> CREATE TABLE o_1 ( id SERIAL ... );
> CREATE TABLE o_2 ( id SERIAL ... );
> CREATE TABLE o_3 ( id SERIAL ... );
> CREATE TABLE comments (
>id SERIAL,
>obj_id INTEGER ...
>FOREIGN KEY (obj_
On Jan 7, 2008, at 6:00 PM, Richard Broersma Jr wrote:
--- On Mon, 1/7/08, Erik Jones <[EMAIL PROTECTED]> wrote:
From: Erik Jones <[EMAIL PROTECTED]>
Subject: Re: [GENERAL] many to one of many modeling question
To: "Richard Broersma Jr" <[EMAIL PROTECTED]>
Cc: &quo
--- On Mon, 1/7/08, Erik Jones <[EMAIL PROTECTED]> wrote:
> From: Erik Jones <[EMAIL PROTECTED]>
> Subject: Re: [GENERAL] many to one of many modeling question
> To: "Richard Broersma Jr" <[EMAIL PROTECTED]>
> Cc: "Postgres General List" , &
On Jan 7, 2008, at 2:22 PM, Richard Broersma Jr wrote:
CREATE TABLE comments (
id SERIAL,
obj_id INTEGER ...
FOREIGN KEY (obj_id)
REFERENCES ONE OF o(id);
Where are you guys getting this REFERENCES ONE OF stuff?
Erik Jones
DBA | Emma®
[EMAIL PROTECTED]
800.595.4401 or 615.29
--- On Mon, 1/7/08, Kevin Hunter <[EMAIL PROTECTED]> wrote:
> :-( Yeah this is one method. I was hoping for something
> cleaner though.
> Something along the lines of
>
> CREATE TABLE o_1 ( id SERIAL ... );
> CREATE TABLE o_2 ( id SERIAL ... );
> CREATE TABLE o_3 ( id SERIAL ... );
> CREATE T
At 2:09p -0500 on 07 Jan 2008, brian wrote:
Kevin Hunter wrote:
Is there a clever/clean way of having the comments foreign key into
the multiple tables?
If, by object, you mean that you have several tables, each row of which
should be associated with one or more comments, the best way would b
Kevin Hunter wrote:
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 thir
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
10 matches
Mail list logo