EAV - is it really bad in all scenarios?
Posted
by
Giedrius
on Programmers
See other posts from Programmers
or by Giedrius
Published on 2011-07-15T14:22:54Z
Indexed on
2014/06/07
21:36 UTC
Read the original article
Hit count: 242
I'm thinking to use EAV for some of the stuff in one of the projects, but all questions about it in stackoverflow end up to answers calling EAV an anti pattern.
But I'm wondering, if is it that wrong in all cases?
Let's say shop product entity, it has common features, like name, description, image, price, etc., that take part in logic many places and has (semi)unique features, like watch and beach ball would be described by completely different aspects. So I think EAV would fit for storing those (semi)unique features?
All this is assuming, that for showing product list, it is enough info in product table (that means no EAV is involved) and just when showing one product/comparing up to 5 products/etc. data saved using EAV is used.
I've seen such approach in Magento commerce and it is quite popular, so may be there are cases, when EAV is reasonable?
© Programmers or respective owner