Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Small design issue
Message
From
28/06/2000 16:26:02
 
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00386038
Message ID:
00386088
Views:
24
Dan:

Thanks for the response. I should have made it clear that, yes, the products are packaged differently. That is, the same item is packaged in different quantities but sold under the same part number. The manufacturer does not want to assign the products different part numbers. They want to drive the distinction off of the quantity.

>>I am working on some pricing data for a manufacturer. They have the following situation:
>>
>>part number - quantity - price
>>12345 - 1 - 2.00
>>12345 - 10 - 15.00
>>12345 - 100 - 150.00
>>
>>The key here is that, while the part is the same, the price changes based on the quantity.
>>
>>In the past, I have seen this represented with different part numbers. This made sense 'cause, for instance, a case of an item is really a different item. That would look like this:
>>
>>part number - quantity - price
>>12345 - 1 - 2.00
>>44444 - 10 (of part 12345) - 15.00
>>98765 - 100 (of part 12345) - 150.00
>>
>>Given that the current scheme (i.e. sample 1) will not be changed, what is the appropriate way to design the tables?
>>
>>One could say that the part number and quantity form the primary key for price (in the first sample). However, quantity is normally considered a product attribute (versus a price attribute). I typically have reasons to maintain a separate product table that would have quantity.
>>
>>I suppose I could have part number and quantity in the product table associated to a primary key that would be used in the price table. For example:
>>
>>product table
>>primary key - part number - quantity
>>999 - 12345 - 1
>>555 - 44444 - 10 (of part 12345)
>>111 - 98765 - 100 (of part 12345)
>>
>>price table
>>part number - quantity - price
>>999 - 2.00
>>555 - 15.00
>>111 - 150.00
>>
>>This seems so simple but has me bugged. I figured a bunch of people would have experienced this and have an easy answer. Please advise. TIA.
>
>Are the parts only sold in groups? I.e. you can buy one, ten, or a hundred, but not seven, for example. If the price is a range (from 1 - 9, $2 each, from 10 to 99, $1.50 each) then you might want to do this:
>
>price table
>part no / start / end / price
>12345 / 1 / 9 / $2.00
>12345 / 10 / 99 / $1.50
>etc
>
>If the parts are packaged differently - singly, carton of ten, case of 100 - then it makes sense to have a different part number and pricing in the product table.
>
>Hope that helps.
Previous
Reply
Map
View

Click here to load this message in the networking platform