The ProductPackages table is what is known as an associate table, and is
used to implement a many-to-many relationship. You only need it if a given
product can be in multiple packages. If not, then you can eliminate the
associative table and just add a PackageID column to the Products table.

There's also a possible tiny wrinkle that may require another new column. I
once did an app similar to yours, with the many-to-many requirement. The
wrinkle was that a given package might contain several instances of a given
product (i.e. four jars of jam, for example). Because one of the goals of
the app was to generate a packing list, and the packages were assembled only
upon demand, the packing list told the shippers what to assemble. To meet
this requirement, I added a quantity column to the associative table, so
that in Package A there might be four jars of jam and in Package B only two.

hth,
Arthur

Reply via email to