Hi,
>Let us supposed that for an inventory system, the products have diff units of packing. For instance, let's talk about Coke. Coke in a 1 liter bottle has a diff code than Coke in a 355ml can right? How about 1 liter Coke in a carton of 12s? Should it have a diff code than the individual Coke 1 liter?
>
>What would be a better practice? Have separate records for Coke 1 liter, Coke 1 liter 12's? OR provide additional fields for the Coke 1 liter records to accept 2 or maybe more packing units?
>
The solution probably depends on the percentage of items where this occurs. If the frequency is low I'd use the first option. I don't think I'd consider the second option at all - too inflexible (and 'flat-file'ish).
The *most* flexible option may be the old 'component/assembly' design using three tables (ideally allowing an assembly list to recursively contain other assemblies as well as components)
:
Components:
1 Coke 333 ml
2 Coke 1 ltr
3 Potato Chips
4 Sandwich
etc...
Assemblies (Inventory Items)
ID Name etc
....
3 12 x 1Litre Coke Pack
4 6 x 1Litre Coke Pack
5 Large Coke with free chips
6 Deluxe Picnic Hamper
Assembly List
AID Component Assembly Quan
3 2 12
4 2 6
5 2 1
5 3 1
6 5 1
6 4 1
etc. HTH,
Viv