Re: multi column foreign key for implicitly unique columns

Поиск
Список
Период
Сортировка
От Josh Berkus
Тема Re: multi column foreign key for implicitly unique columns
Дата
Msg-id 200408181155.34472.josh@agliodbs.com
обсуждение исходный текст
Ответ на Re: multi column foreign key for implicitly unique columns  (Jan Wieck <JanWieck@Yahoo.com>)
Ответы Re: multi column foreign key for implicitly unique columns  (Jan Wieck <JanWieck@Yahoo.com>)
Список pgsql-sql
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.

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.

-- 
--Josh

Josh Berkus
Aglio Database Solutions
San Francisco


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: SQL Challenge: Arbitrary Cross-tab
Следующее
От: Bruno Wolff III
Дата:
Сообщение: Re: multi column foreign key for implicitly unique columns