Non atomic data types and quantity pricing

Поиск
Список
Период
Сортировка
От Jeff Davis
Тема Non atomic data types and quantity pricing
Дата
Msg-id 20000123074538.10881.qmail@web3001.mail.yahoo.com
обсуждение исходный текст
Ответы Re: [GENERAL] Non atomic data types and quantity pricing  (Charles Tassell <ctassell@isn.net>)
Список 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 по дате отправления:

Предыдущее
От: D Herssein
Дата:
Сообщение: [HELP] - Installing Postgres
Следующее
От: Charles Tassell
Дата:
Сообщение: Re: [GENERAL] Non atomic data types and quantity pricing