Non atomic data types and quantity pricing - Mailing list pgsql-general

From Jeff Davis
Subject Non atomic data types and quantity pricing
Date
Msg-id 20000123074538.10881.qmail@web3001.mail.yahoo.com
Whole thread Raw
Responses Re: [GENERAL] Non atomic data types and quantity pricing  (Charles Tassell <ctassell@isn.net>)
List pgsql-general
I am making a database to store product information. I
am going to need to use quantity pricing breaks
(different prices for buying a lot).

I was first thinking that I should use a seperate
table and, for each product have several rows, which
is how many people do that. But that method seems
somewhat awkward, so I thought an array type would be
a better solution.

However, when I thought about it some more and read
more documentation, I found that the select statements
I would need would be nearly impossible. For example:

I want to get the price for quantity X so i need to
select the greatest value in the array that is less
than X as the quantity break value that applies to
them.

Could someone help me find a solution involving
arrays?

Thanks,
Jeff Davis
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com

pgsql-general by date:

Previous
From: D Herssein
Date:
Subject: [HELP] - Installing Postgres
Next
From: Charles Tassell
Date:
Subject: Re: [GENERAL] Non atomic data types and quantity pricing