On Mon, Jan 4, 2010 at 10:40 AM, Arthur Fuller <fuller.art...@gmail.com>wrote:
> 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. > I don't think I have to do that. I've coded it but not tested yet. I think I have the concept, however. Thanks! V