El 22/10/11 18:10, David Johnston escribió:
> 
> 
> SELECT ...
> FROM vendor_invoices
> JOIN ( SELECT ... FROM eav WHERE category = '' ) icm USING ( invoice_id )
> 
> Add a sub-query join for each desired category.
> 
> I agree HStore looks cleaner for the query example you give.  One apparent 
> advantage is that since each record contains a single value you can use 
> additional columns to store properties (e.g. Units) whereas the hstore makes 
> that more difficult - though not impossible - since the keys are bot 
> naturally related to each other.
> 
> From an output perspective hstore looks good.  If there are no difficulties 
> on the data input process you might as well just go with it.  Given your 
> volume and use-case it really isn't going to matter which option you pick; 
> though I'd suggest providing views related to each major category with only 
> the appropriate values and no access to the hstore column.
> 
> David J.
> 
> 

I will try with hstore and EAV both and see what seems more natural for me, i
have to take account how easy/clean it is to work with both from the Qt
application, i think eav would be much better to edit in a table.

Thanks to all for the replies.

Regards,
Miguel Angel.

-- 
Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-sql

Reply via email to