Wednesday, March 7, 2012

DB normalization dilema

Hi,
I have a Product table that includes Price1, Price2, and Price3 fields.
Some products can have 1 price some 2 and some 3 so its not an efficient table (i set the values to 0 if not exist in the product).
following normalization i created new table with ID and Price Fields and deleted the prices fields from the Product table.
My dilema is when I insert many records (~100,000) using update batch it takes the table to be update few time more time then in the original form.
Is it worth it to do normalization in this case?
Thanks
Yossiwhen you normalized the design to make separate rows for the three prices, how did you distinguish them? what makes price2 different from price1, and price3 different from price2?

speed of update is only one consideration in normalization, but speed of querying is usually more important

you had to re-write all your queries that used price, didn't you? did you find out anything about how those perform?

rudy
http://rudy.ca/

No comments:

Post a Comment