0

In this link here

they explain how to use junction tables to get around the many-many relationship problem in relational database design.

This line

If there is no association class, the junction table (sometimes also called a join table or linking table) will contain only the FK attributes from each side of the association.

From the example it seems that the junction table is containing not the FK but the primary keys of the individual tables. Cust ID, Order Date together form the composite primary key of orders and UPC is the primary key of Products.

4

1 回答 1

0

正确的。您的“联结”表或“关联”表将包含 M2M 关系任一端的表的 PK 值。通常这些是关联/联结表中仅有的两列,它们可以/通常形成关联/联结表的 PK。

于 2013-08-28T20:28:12.647 回答