I've got a database application that stores prices for things in various places. Each cost has got the following data connected by using it:
- product ID
- cost type (factory/wholesale/retail)
The final three products (pID, country, pricetype) could be regarded as one composite item explaining the objective of the cost there's lots of redundancy within this data. So I am thinking: separate individuals out to their own table in order to save space and simplify queries.
Normal: Prices (price_id, price, date, product_id, country_id, pricetype_id) vs: Prices (price_id, price, date, descriptor_id) Descriptors (descriptor_id, product_id, country_id, pricetype_id)
Is well worth the added programming effort needed? Could it be pretty much extensible/maintainable over time?
Is well worth the added programming effort needed?
Could it be pretty much extensible/maintainable over time?
More extensible and simpler to keep.
It is best to normalize to a minimum of 3NF.
Check this out article: http://databases.about.com/od/specificproducts/a/normalization.htm
It is dependent on the quantity of data you're expecting for the reason that table. For those who have no performance/storage problems, you do not need separate tables (for performance reasons).
However, you're going to get all disadvantages that include redundancy. You need to look at your data for incongruencies etc.
But: No matter the look you select, there's still time to adjust the street you are on.