Ok, yet another question!
I'm putting together a db of products. Each product can have more than one price (like price breaks), and prices can apply to more than one product. (For instance, different colors of a t-shirt).
So it is a many-to-many relationship I think. I understand about the whole linking table thing... having table Products, table Price, then having table ProductsPrice, but when I tried to do it that way, there was a ton of redundant data.
For example, I have a series of 100 products that all have the same 5 price breaks (50=$1.25, 100=$1.15, etc). So with a linking table, I would have to enter each PartNumber in the table 5 times (500 hundred entries), but each PartNumber has the same price break. I scraped that table b/c if I want to update the price breaks, I would have to go and do it for each product (100 times!).
How else can I do it? I thought a table Price that had a PK, a PriceGroup, then Quantity & Price. PriceGroup groups prices together. So if there were 5 price breaks for one product, they would all have the same PriceGroup. Then in table Products, I just enter PriceGroup. So all 100 products will point to the same 5 price breaks.
Is that a bad idea? Any other ways to do it?
Nicole
I'm putting together a db of products. Each product can have more than one price (like price breaks), and prices can apply to more than one product. (For instance, different colors of a t-shirt).
So it is a many-to-many relationship I think. I understand about the whole linking table thing... having table Products, table Price, then having table ProductsPrice, but when I tried to do it that way, there was a ton of redundant data.
For example, I have a series of 100 products that all have the same 5 price breaks (50=$1.25, 100=$1.15, etc). So with a linking table, I would have to enter each PartNumber in the table 5 times (500 hundred entries), but each PartNumber has the same price break. I scraped that table b/c if I want to update the price breaks, I would have to go and do it for each product (100 times!).
How else can I do it? I thought a table Price that had a PK, a PriceGroup, then Quantity & Price. PriceGroup groups prices together. So if there were 5 price breaks for one product, they would all have the same PriceGroup. Then in table Products, I just enter PriceGroup. So all 100 products will point to the same 5 price breaks.
Is that a bad idea? Any other ways to do it?
Nicole