[thelist] yet another database/table relationship design question
rudy
r937 at interlog.com
Thu Oct 17 20:20:01 CDT 2002
> You need an FK from Product.Product_ID (primary)
> to Journals.Product_ID (foreign), and one from
> Product.Product_ID (primary) to Ancillaries.Product_ID (foreign),
> but you know this.
paul, you have more than likely figured out the problem, but the way you
have expressed yourself in the above sentence is typical and perhaps
symptomatic of the trouble people can get into
the foreign key sits in the "many" table, and points to the "one" table
so it's not a foreign key from Product to Journal, rather, it's a foreign
key from Journal to Product
similarly, it's a foreign key from Ancillaries to Product
it's always from the child to the parent
rudy
More information about the thelist
mailing list