Re: multi column foreign key for implicitly unique columns - Mailing list pgsql-sql

From Jan Wieck
Subject Re: multi column foreign key for implicitly unique columns
Date
Msg-id 4123D91D.8060601@Yahoo.com
Whole thread Raw
In response to Re: multi column foreign key for implicitly unique columns  (Josh Berkus <josh@agliodbs.com>)
Responses Re: multi column foreign key for implicitly unique columns  (Josh Berkus <josh@agliodbs.com>)
List pgsql-sql
On 8/18/2004 2:55 PM, Josh Berkus wrote:
> Jan,
>>
>> If a.x is unique, then (b.x, b.y) references (a.x, a.y) is only ensuring
>> that the redundant copy of y in b.y stays in sync with a.y.
> 
> So?  What's denormalized about that?  His other choice is to use a trigger.

Because the value in b.y is redundant. b.x->a.x->a.y is exactly the same  value and he even wants to ensure this with
theconstraint.
 


Jan

> 
> What he's trying to do is ensure that the class selected for the FK 
> class_name, field_name relates to the same class_name in objects.
> 


-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #


pgsql-sql by date:

Previous
From: Theo Galanakis
Date:
Subject: Re:
Next
From: Theo Galanakis
Date:
Subject: Function Issue!