On Fri, Jul 30, 2004 at 12:01:44 -0500,
"Thomas T. Thai" <tom@minnesota.com> wrote:
>
> The above setup works. In table groupie_mod_pref, I needed mod_id to be
> a shared common foreign key in two other tables. Consequently in used
> two table constraints in groupie_mod_pref. However, I thought that was a
> waste of storage space having to repeat groupie_id and mod_id from
> groupie_mod. Is there anyway to keep the functionality like above, while
> using groupie_mod_id from groupie_mod in groupie_mod_pref in place of
> groupie_id and mod_id and still constrain mod_id to mod_pref table?
Not easily. (It should be possible to do with triggers.) What you could do
is use a compound primary key in groupie_mod and mod_pref get rid of the
(presumably) surrogate primary keys.