Database Normalization, a little confuse
Good Day :), I a trying to learn database normalization, I have read this page, this page is very easy to understand and I was able
to understand what they are tying to point. But what confuse me is the way they seperate the item_price in the order_item table.
At the page I have read, in the ending of tables where these are analyzed and normalized, they
put item_price to the item table and did not put price on order_item table.
Here are the tables thay use.
customer table's fields:
orders table's fields:
order_items table's fields:
items table's fields:
I believe item_price should not be removed at order_items since item_price will depend on the order_id, and both table (order_item and items) item_price field.
I thought this because the item_price at items table may increase/decrease but should not affect the price that the customer orders which will be saved at order_items table.
BUT, if both table(items and order_items) item_price will it violate 1NF's rule? Or is it OK?
Any explanation will be greatly appreciated.