J
Jeff
I am using Access 2007 and we are redesigning a database application.
Everything is done except for the way the client would like the prices for
items stored. Below are the 3 tables and structures we have come up with so
far.
Items *...........* ItemStyles *.......................* ItemPrices
ItemID ItemStyleID ItemPriceID
ItemPCode ItemID ItemID
Description
ItemStyleID
Associated ItemStyleID Price
There can be from 1 to many ItemStyles. Normally there are 12. The
combination of ItemStyleID and ItemID determines the price. Since Various
ItemStyles have the exact same ItemID' s and Prices we want to only store
the price once.
Example there are 5 ItemStyles (IS1, IS2, IS3, IS4, IS4)
IS1 and IS3 have the exact same prices so we want to only have 1 record for
each ItemStyleID\ItemID combination in the ItemPrices Table for IS1 and IS3.
IS2, 4, and 5 all have different prices so they each have separate record
for there prices. If they decide to change IS3 prices then we need to be
able to have the ItemPrice table updated, as well as if they decided to make
the prices for IS5 be the same as IS1, then they would need to become one
entry in the itemprice table.
What we came up with was to add an AssociatedItemStyleID field to the
ItemStyle table and any ItemStyles sharing the same price structure would be
flagged here. One problem is how to get these to be displayed in a form for
the user to change or add prices. I was thinking of a view for this, but
not sure. Another is how to get the adding\updating in the ItemPrice table
to work. If there is a better solution for the tables, any input would be
appreciated.
TIA
Everything is done except for the way the client would like the prices for
items stored. Below are the 3 tables and structures we have come up with so
far.
Items *...........* ItemStyles *.......................* ItemPrices
ItemID ItemStyleID ItemPriceID
ItemPCode ItemID ItemID
Description
ItemStyleID
Associated ItemStyleID Price
There can be from 1 to many ItemStyles. Normally there are 12. The
combination of ItemStyleID and ItemID determines the price. Since Various
ItemStyles have the exact same ItemID' s and Prices we want to only store
the price once.
Example there are 5 ItemStyles (IS1, IS2, IS3, IS4, IS4)
IS1 and IS3 have the exact same prices so we want to only have 1 record for
each ItemStyleID\ItemID combination in the ItemPrices Table for IS1 and IS3.
IS2, 4, and 5 all have different prices so they each have separate record
for there prices. If they decide to change IS3 prices then we need to be
able to have the ItemPrice table updated, as well as if they decided to make
the prices for IS5 be the same as IS1, then they would need to become one
entry in the itemprice table.
What we came up with was to add an AssociatedItemStyleID field to the
ItemStyle table and any ItemStyles sharing the same price structure would be
flagged here. One problem is how to get these to be displayed in a form for
the user to change or add prices. I was thinking of a view for this, but
not sure. Another is how to get the adding\updating in the ItemPrice table
to work. If there is a better solution for the tables, any input would be
appreciated.
TIA