I made a PDM (Physical Data Model) for my database project, this one use an EAV (Entity-Attribute-Value) model, so I would like to know if Yii support EAV database model ?
And if yes where can I find some exemples or tutorials with this kind of database ?
Never heard about EAV, but interesting. Is that a concept you have to implement yourself on a existing relational DB (MySQL) or are there DBMS directly supporting this?
If you have to build it yourself (like attribute table user_attributes with fields user_id, name, value) you can easily access these attributes from the main user record. You can define a HAS_MANY relation from user->user_attributes and use the ‘index’ feature of ARR, for convenient access to these dynamic attributes.
Magento uses EAV extensively, but it’s terribly slow. EAV is slow, and in most case you can do same thing (I mean: obtain same recordset result) without using it.
It’s simply an how-you-design-DB problem: Magento uses EAV for everything, and it’s not good for me. I don’t like Magento DB design because of extensive use of EAV pattern.
I’m not saying that EAV is 100% evil, for example for custom product’s options I don’t see anything different from using EAV, but I think it’s a last chance for a DB designer.
I agree that Magento is very slow, it seems overly complicated too, however I think that EAV works well for the product definitions. From a users point of view, it is great to be able to add as many attributes to the product as desired.
If you want to run Magento you need a very capable server. A lot of shared hosting options just don’t cut it.
I never really analyzed the Magento DB so thanks for pointing out that part of the performance hit is in the data access, I always just thought the thing was bloated.
EAV on MySQL is slow. I have experience on a Joomla extension module that use EAV to store some of its data. Once the record goes over ten of thousand. Part of that extension just stop working, take a extremely long time for request to come back. Till timeout.
If you are looking for EAV modeling and have load of records, document based database will be better. Take a look at Mango.
EAV databases are generally slow, and very hard to scale them(on MySql).
Magento is slow for many reason, and one of reason is very complex db structure, and because it is made to be easy customized, so there are thousands of options that need to be parsed(queried).