Exactly: query saving a join. The project is related to the fresh fruit 
packing industry. The size of the fruits are a relevant attribute (price 
relates to it).
Even if they try to build pallets from boxes containing fruits of only 
one size, that's not always possible. So, the "size" of the fruits are 
expressed as a so named "grid", in fact, a vector of quantities, 
correlated with a vector of sizes (which in turn are not true sizes, but 
number of fruits per carton, so there is a size vector related to every 
box type... very old fashioned, but so is this market). To describe a 
pallet ( around 70 boxes, depending on box type ) it's required a 
quantity vector with 12 elements. But because other attributes (farmer, 
crop date, etc) one pallet may require various of these vectors. Imagine 
the performance gain if all the elements are retrieved in one operation.
That is the class of problems which postgres' people attempted to cope with.
And, in a more general way, it's wise to denormalize some of the data 
model.
Regards

On 12/20/2010 04:35 PM, Ed Leafe wrote:
> On Dec 20, 2010, at 2:26 PM, Ricardo Aráoz wrote:
>
>> As a side question, what could you possibly do with a vector of integers
>> field that you cannot do with a one to many relation to a table with a
>> foreign key and integers?
>       Query without doing a join?  ;-)
>
>       PostgreSQL has some built-in functions for manipulating these values. I 
> don't know of a particular application for this; perhaps Marcelo can explain 
> a little more about how he uses these values.
>
>
>
> -- Ed Leafe
>
>
>
> _______________________________________________
> Post Messages to: [email protected]
> Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
> Searchable Archives: http://leafe.com/archives/search/dabo-users
> This message: 
> http://leafe.com/archives/byMID/[email protected]
>

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to