Cedar,
> I guess I wasn't clear. Let me try to explain again:
>
> CREATE TABLE obj_weights (
> object_id int4 REFERENCES ( apple_objects(id) OR
> banana_objects(id) )
> weight float4,
> )
>
> "apple_objects" doesn't necessarily have anything to do with
> "banana_objects". Ok, don'
On Wed, 8 Aug 2001, Cedar Cox wrote:
>
> Two questions (maybe they are silly..)
>
> 1. Can a column reference more than one table? (This assumes you use a
> single sequence to generate the IDs for both "tbla" and "tblb". I guess
> you would also have the problem of enforcing a unique index.
Josh Berkus wrote:
> Cedar,
>
> > 1. Can a column reference more than one table? (This assumes you use
> > a
> > single sequence to generate the IDs for both "tbla" and "tblb". I
> > guess
> > you would also have the problem of enforcing a unique index. Say
> > what?!
> > A unique index across
As for me it is looking as not good normalized structure.
After normalization should not be any questions, I think...
Aug 8, 19:02 +0300, Cedar Cox wrote:
>
> Two questions (maybe they are silly..)
>
> 1. Can a column reference more than one table? (This assumes you use a
> single sequence to g
Cedar,
(sorry for the double posting, folks)
> 2. Can a column reference another column in the same table? eg..
>
> CREATE TABLE bloo (
> id int4,
> p_id int4 REFERENCES bloo (id)
> -- or
> --p_id int4 REFERENCES (id)
> )
You don't do this with REFERENCES ... you do it with a
Cedar,
> 1. Can a column reference more than one table? (This assumes you use
> a
> single sequence to generate the IDs for both "tbla" and "tblb". I
> guess
> you would also have the problem of enforcing a unique index. Say
> what?!
> A unique index across multiple tables.. absurd :) eg..