Book Image

Magento PHP Developer????s Guide, 2nd Edition

By : Allan MacGregor
Book Image

Magento PHP Developer????s Guide, 2nd Edition

By: Allan MacGregor

Overview of this book

Table of Contents (16 chapters)
Magento PHP Developer's Guide Second Edition
About the Author
About the Reviewers

The EAV model

EAV stands for entity, attribute, and value and is probably the most difficult concept for new Magento developers to grasp. While the EAV concept is not unique to Magento, it is rarely implemented on modern systems. Additionally, a Magento implementation is not a simple one.

What is EAV?

In order to understand what EAV is and what its role within Magento is, we need to break down parts of the EAV model:

  • Entity: This represents the data items (objects) inside Magento products, customers, categories, and orders. Each entity is stored in the database with a unique ID.

  • Attribute: These are our object properties. Instead of having one column per attribute on the product table, attributes are stored on separate sets of tables.

  • Value: As the name implies, it is simply the value link to a particular attribute.

This data model is the secret behind Magento's flexibility and power, allowing entities to add and remove new properties without having to make any changes to the code, templates...