SlideShare a Scribd company logo
Mohammad Haj-Salem
Magento database
Principles of the EAV system and implementation in
Magento!
Who is Mohammad Haj-Salem?
❏ Software engineer graduated from Damascus university in 2010
❏ Web developer
❏ Oracle solutions consultant
❏ ODI/ EDQ data integration - data quality Specialist
❏ ETL/ELT processes driven by SOA(Service-oriented architecture)
❏ PL/SQL processes
❏ Database designer
❏ Technical analyst
❏ Magento Developer for almost one and half
a year in E-CONOMIX. (Nov. 2015)
Experiences
Brainstorming
❏ The first problem an analyst faces is: What attributes do I need for each
entity?!
❏ Do I have fixed number of attributes?!
❏ If I was able to include all attributes, will all of them have values or I'll get
a mega null values table?!
❏ Is it applicable to have all needed attributes in e-commerce area ?!
Database modelling
A database model shows the logical structure of a database, including the
relationships and constraints that determine how data can be stored and
accessed.
Some types of database models
❏ Hierarchical database model
❏ Relational model // most common model
❏ Network model
❏ Object-oriented database model
❏ Entity-relationship model
❏ Document model
❏ EAV model
❏ Star schema
❏ NoSQL database models
Magento uses EAV
What’s EAV?
EAV
source:http://devdocs.magento.com/
What is EAV
Wikipedia defines EAV as
Entity-Attribute-Value model (EAV), also known as object-attribute-value model and
open schema is a data model that is used in circumstances where the number of
attributes (properties, parameters) that can be used to describe a thing (an "entity" or
"object") is potentially very vast, but the number that will actually apply to a given entity
is relatively modest. In mathematics, this model is known as a sparse matrix.
source:http://devdocs.magento.com/
Facts
Source: Magento CE 1.9.2.2 database diagram
❏ Magento CE 1.9.2.2 initial installation has 333 tables!
❏ 19 tables start with core_*
❏ 47 tables start with sales_*
❏ 84 tables start with catalog_*
M2 Facts
❏ Magento CE 2.1.3 initial installation has 315 tables
❏ 1 table starts with core_*
❏ 38 tables start with sales_*
❏ 76 tables start with catalog_*
Source: Magento CE 2.1.3 database diagram
Why Magento uses EAV
Magento uses EAV database model for easy upgrade and development as
this model gives more flexibility to play with data and attributes.
❏ No alter tables scripts needed
❏ No broken ORM after upgrade
❏ EAV gives developers more control over attributes, data and how to group them
EAV vs Row modelling
❏ Sparseness of attributes
❏ In EAV model one row describes one attribute on the other hand the
row modelling one row describes one entity
❏ In row model new attribute means new column “(DDL) Data Definition
Language” , in EAV new attribute is new row “(DML) Data Manipulation
Language”
Products
product_id
prod_name
price
new_attribute
Product_id prod_name price new_attribute ….
1 Prod1 10 nA1
2 Prod2 20 nA2
EAV vs Row modelling
attribute_id = attribute_id
attributes
attribute_id name data_type
1 prod_name varchar
2 price decimal
entity
entity_id column_1
1 column_value
2 c_v_2
attribute_values_varchar
value_id attribute_id entity_id value
1 1 1 prod1
2 1 2 prod2
entity_id = entity_id
attribute_values_decimal
value_id attribute_id entity_id value
1 2 1 10
2 2 2 20
EAV vs Row modelling
❏ Performance wise
❏ row modelling is faster as far as a query runs on one table
❏ EAV modelling can be SQL intensive, this why you have to be accurate adding
attributes to select in Magento (we’re going to talk about this part later on.)
Magento uses the EAV model
Magento uses the EAV model
❏ eav_attribute table contains all attributes
❏ The name of the attribute is saved as attribute_code
❏ entity_type_id a foreign key from the table eav_entity_type
attribute_id smallint
entity_type_id smallint
attribute_code varchar
.. ..
Magento uses the EAV model
❏ eav_entity_type table contains all entity types in Magento
entity_type_id smallint
entity_type_code varchar(50)
entity_model varchar(255)
.. ..
Magento uses the EAV model
Is he going to go through all those tables?!
Nope!
But, it worth mentioning
{entity_type_code}_entity
{entity_type_code}_entity_{dataType}
How to create EAV Model in Magento
How to create EAV Model in Magento
❏ Define a model in config.xml
<global>
<!-- ... -->
<models>
<!-- ... -->
<complexworld>
<class>Alanstormdotcom_Complexworld_Model</class>
<resourceModel>complexworld_resource_eav_mysql4</resourceModel>
<resourceModel>complexworld_resource_eav_resource</resourceModel>
</complexworld>
<!-- ... -->
</models>
<!-- ... -->
</global>
❏ Notice the <resourceModel/> node
❏ EAV: {model}_resource_eav_mysql4
❏ Normal: {model}_mysql4 was deprecated after 1.6.x.x
❏ Notice: {model}_mysql4 =>{model}_resource
source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
How to create EAV model in Magento - usual steps
❏ inform Magento about your resource
<models>
<!-- ... -->
<complexworld_resource_eav_mysql4>
<class>Alanstormdotcom_Complexworld_Model_Resource_Eav_Mysql4</class>
<class>Alanstormdotcom_Complexworld_Model_Resource_Eav_Resource</class>
<entities>
<eavblogpost>
<table>eavblog_posts</table>
</eavblogpost>
</entities>
</complexworld_resource_eav_mysql4>
<!-- ... -->
</models>
source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
How to create EAV Model in Magento - Create your classes
❏ Model class
class Alanstormdotcom_Complexworld_Model_Eavblogpost extends
Mage_Core_Model_Abstract {
protected function _construct()
{
$this->_init('complexworld/eavblogpost');
}
}
❏ Model’s resource classes
class Alanstormdotcom_Complexworld_Model_Resource_Eav_Mysql4_Eavblogpost extends
Mage_Eav_Model_Entity_Abstract
{
public function _construct()
{
$resource = Mage::getSingleton('core/resource');
$this->setType('complexworld_eavblogpost'); //entity_type_code
$this->setConnection(
$resource->getConnection('complexworld_read'),
$resource->getConnection('complexworld_write')
);
}
}
EAV:Mage_Eav_Model_Entity_Abstract
Normal: Mage_Core_Model_Resource_Db_Abstract (+)
source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
How to create EAV Model in Magento - setup script
In order to make our Module working we need to insert Row in eav_entity_type,
eav_attribute_group and eav_attribute_set, which can be manual or
Automated
source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
How to create EAV model in Magento - setup script
❏ Create setup script
<resources>
<!-- ... -->
<complexworld_setup>
<setup>
<module>Alanstormdotcom_Complexworld</module>
<class>Alanstormdotcom_Complexworld_Entity_Setup</class>
</setup>
<connection>
<use>core_setup</use>
</connection>
</complexworld_setup>
<!-- ... -->
</resources>
❏ setup classes will be extending Mage_Eav_Model_Entity_Setup rather than
Mage_Core_Model_Resource_Setup
class Alanstormdotcom_Complexworld_Entity_Setup extends
Mage_Eav_Model_Entity_Setup {
source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
How to create EAV Model in Magento - Configure new Entity
❏ In the setup class
public function getDefaultEntities()
{
return array (
'complexworld_eavblogpost' => array(
'entity_model' => 'complexworld/eavblogpost',
'attribute_model' => '',
'table' => 'complexworld/eavblogpost',
'attributes' => array(
'title' => array(
'type' => 'varchar',
'backend' => '',
'frontend' => '',
'label' => 'Title',
'input' => 'text',
'class' => '',
'source' => '',
'global' => 0,
'visible' => true,
'required' => true,
'user_defined' => true,
'default' => '',
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'unique' => false,
),
),
)
);
}
source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
After running the script we’ll get new
row in eav_attribute and
eav_entity_attribute
How to create EAV model in Magento - Data set/get
❏ Set a value
$weblog2 = Mage::getModel('complexworld/eavblogpost');
$weblog2->set{AttributeCode}(‘value’);
$weblog2->setTitle(‘value’);
$weblog2->save();
❏ Get a value
$weblog2 = Mage::getModel('complexworld/eavblogpost');
$entries = $weblog2->getCollection()
->addAttributeToSelect('{AttributeCode}');
$entries = $weblog2->getCollection()
->addAttributeToSelect('title');
Take care by using
$weblog2->getCollection()->addAttributeToSelect(*);
source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
Really flexible
Even though it sometimes causes headache
❏ Performance
❏ Changes in datatype
❏ Manual imports
❏ 3rd Party User Complexity
The End!
@mhajsalem
https://www.linkedin.com/in/mhajsalem/
https://www.xing.com/profile/Mohammad_HAJSALEM

More Related Content

PDF
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
PDF
Extensible Data Modeling
PPTX
Asp.net mvc training
PPT
JDBC – Java Database Connectivity
PPTX
Jdbc ppt
PDF
Dare to build vertical design with relational data (Entity-Attribute-Value)
PPTX
Database Access With JDBC
PPTX
Java Database Connectivity (JDBC)
Michael Bayer Introduction to SQLAlchemy @ Postgres Open
Extensible Data Modeling
Asp.net mvc training
JDBC – Java Database Connectivity
Jdbc ppt
Dare to build vertical design with relational data (Entity-Attribute-Value)
Database Access With JDBC
Java Database Connectivity (JDBC)

What's hot (20)

PPTX
Jdbc in servlets
PDF
PPT
Hello Android
PPTX
Introduction to JPA Framework
DOCX
Sql interview questions
PPT
Jdbc ppt
PDF
CN/UML at IPDPS JavaPDC 2007
PPS
Jdbc api
PDF
Java on Google App engine
PPT
PPTX
SQL, Embedded SQL, Dynamic SQL and SQLJ
PPS
Jdbc example program with access and MySql
PPTX
Introduction to JPA (JPA version 2.0)
PPTX
Hibernate inheritance and relational mappings with examples
PDF
Oracle SQL Basics
PPT
jpa-hibernate-presentation
PPTX
embedded-static-&dynamic
Jdbc in servlets
Hello Android
Introduction to JPA Framework
Sql interview questions
Jdbc ppt
CN/UML at IPDPS JavaPDC 2007
Jdbc api
Java on Google App engine
SQL, Embedded SQL, Dynamic SQL and SQLJ
Jdbc example program with access and MySql
Introduction to JPA (JPA version 2.0)
Hibernate inheritance and relational mappings with examples
Oracle SQL Basics
jpa-hibernate-presentation
embedded-static-&dynamic
Ad

Similar to 20. Magento Austria meetup - EAV Principles (20)

PPT
Spring MVC
PPTX
Finding Your Way: Understanding Magento Code
PDF
Utilization of zend an ultimate alternate for intense data processing
ODP
Practical catalyst
ODP
springmvc-150923124312-lva1-app6892
ODP
Java Spring MVC Framework with AngularJS by Google and HTML5
PDF
Entity Framework Interview Questions PDF By ScholarHat
PPTX
Asp.NET MVC
PPTX
PPTX
Java- JDBC- Mazenet Solution
PPTX
38. Magento Meetup Austria: Ivan Cuk - From Core to Custom. A Deep Dive into ...
PPT
Using Rails to Create an Enterprise App: A Real-Life Case Study
PDF
Presentation for java data base connectivity
PDF
Wt unit 2 ppts client side technology
PDF
Wt unit 2 ppts client sied technology
PPTX
Fly High With Angular - How to build an app using Angular
PPT
ASP.NET MVC Presentation
PPT
EJB 3.0 Java Persistence with Oracle TopLink
PPT
Struts 2-overview2
PPT
MVC
Spring MVC
Finding Your Way: Understanding Magento Code
Utilization of zend an ultimate alternate for intense data processing
Practical catalyst
springmvc-150923124312-lva1-app6892
Java Spring MVC Framework with AngularJS by Google and HTML5
Entity Framework Interview Questions PDF By ScholarHat
Asp.NET MVC
Java- JDBC- Mazenet Solution
38. Magento Meetup Austria: Ivan Cuk - From Core to Custom. A Deep Dive into ...
Using Rails to Create an Enterprise App: A Real-Life Case Study
Presentation for java data base connectivity
Wt unit 2 ppts client side technology
Wt unit 2 ppts client sied technology
Fly High With Angular - How to build an app using Angular
ASP.NET MVC Presentation
EJB 3.0 Java Persistence with Oracle TopLink
Struts 2-overview2
MVC
Ad

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
STKI Israel Market Study 2025 version august
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
TLE Review Electricity (Electricity).pptx
PDF
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
PPTX
1. Introduction to Computer Programming.pptx
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PPTX
Modernising the Digital Integration Hub
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PDF
A comparative study of natural language inference in Swahili using monolingua...
PDF
Enhancing emotion recognition model for a student engagement use case through...
PPTX
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PPTX
O2C Customer Invoices to Receipt V15A.pptx
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
NewMind AI Weekly Chronicles - August'25-Week II
Univ-Connecticut-ChatGPT-Presentaion.pdf
Group 1 Presentation -Planning and Decision Making .pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf
STKI Israel Market Study 2025 version august
DP Operators-handbook-extract for the Mautical Institute
Developing a website for English-speaking practice to English as a foreign la...
TLE Review Electricity (Electricity).pptx
2021 HotChips TSMC Packaging Technologies for Chiplets and 3D_0819 publish_pu...
1. Introduction to Computer Programming.pptx
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Modernising the Digital Integration Hub
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A comparative study of natural language inference in Swahili using monolingua...
Enhancing emotion recognition model for a student engagement use case through...
MicrosoftCybserSecurityReferenceArchitecture-April-2025.pptx
cloud_computing_Infrastucture_as_cloud_p
A contest of sentiment analysis: k-nearest neighbor versus neural network
O2C Customer Invoices to Receipt V15A.pptx
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...

20. Magento Austria meetup - EAV Principles

  • 1. Mohammad Haj-Salem Magento database Principles of the EAV system and implementation in Magento!
  • 2. Who is Mohammad Haj-Salem? ❏ Software engineer graduated from Damascus university in 2010 ❏ Web developer ❏ Oracle solutions consultant ❏ ODI/ EDQ data integration - data quality Specialist ❏ ETL/ELT processes driven by SOA(Service-oriented architecture) ❏ PL/SQL processes ❏ Database designer ❏ Technical analyst ❏ Magento Developer for almost one and half a year in E-CONOMIX. (Nov. 2015) Experiences
  • 3. Brainstorming ❏ The first problem an analyst faces is: What attributes do I need for each entity?! ❏ Do I have fixed number of attributes?! ❏ If I was able to include all attributes, will all of them have values or I'll get a mega null values table?! ❏ Is it applicable to have all needed attributes in e-commerce area ?!
  • 4. Database modelling A database model shows the logical structure of a database, including the relationships and constraints that determine how data can be stored and accessed. Some types of database models ❏ Hierarchical database model ❏ Relational model // most common model ❏ Network model ❏ Object-oriented database model ❏ Entity-relationship model ❏ Document model ❏ EAV model ❏ Star schema ❏ NoSQL database models
  • 5. Magento uses EAV What’s EAV? EAV source:http://devdocs.magento.com/
  • 6. What is EAV Wikipedia defines EAV as Entity-Attribute-Value model (EAV), also known as object-attribute-value model and open schema is a data model that is used in circumstances where the number of attributes (properties, parameters) that can be used to describe a thing (an "entity" or "object") is potentially very vast, but the number that will actually apply to a given entity is relatively modest. In mathematics, this model is known as a sparse matrix. source:http://devdocs.magento.com/
  • 7. Facts Source: Magento CE 1.9.2.2 database diagram ❏ Magento CE 1.9.2.2 initial installation has 333 tables! ❏ 19 tables start with core_* ❏ 47 tables start with sales_* ❏ 84 tables start with catalog_*
  • 8. M2 Facts ❏ Magento CE 2.1.3 initial installation has 315 tables ❏ 1 table starts with core_* ❏ 38 tables start with sales_* ❏ 76 tables start with catalog_* Source: Magento CE 2.1.3 database diagram
  • 9. Why Magento uses EAV Magento uses EAV database model for easy upgrade and development as this model gives more flexibility to play with data and attributes. ❏ No alter tables scripts needed ❏ No broken ORM after upgrade ❏ EAV gives developers more control over attributes, data and how to group them
  • 10. EAV vs Row modelling ❏ Sparseness of attributes ❏ In EAV model one row describes one attribute on the other hand the row modelling one row describes one entity ❏ In row model new attribute means new column “(DDL) Data Definition Language” , in EAV new attribute is new row “(DML) Data Manipulation Language” Products product_id prod_name price new_attribute Product_id prod_name price new_attribute …. 1 Prod1 10 nA1 2 Prod2 20 nA2
  • 11. EAV vs Row modelling attribute_id = attribute_id attributes attribute_id name data_type 1 prod_name varchar 2 price decimal entity entity_id column_1 1 column_value 2 c_v_2 attribute_values_varchar value_id attribute_id entity_id value 1 1 1 prod1 2 1 2 prod2 entity_id = entity_id attribute_values_decimal value_id attribute_id entity_id value 1 2 1 10 2 2 2 20
  • 12. EAV vs Row modelling ❏ Performance wise ❏ row modelling is faster as far as a query runs on one table ❏ EAV modelling can be SQL intensive, this why you have to be accurate adding attributes to select in Magento (we’re going to talk about this part later on.)
  • 13. Magento uses the EAV model
  • 14. Magento uses the EAV model ❏ eav_attribute table contains all attributes ❏ The name of the attribute is saved as attribute_code ❏ entity_type_id a foreign key from the table eav_entity_type attribute_id smallint entity_type_id smallint attribute_code varchar .. ..
  • 15. Magento uses the EAV model ❏ eav_entity_type table contains all entity types in Magento entity_type_id smallint entity_type_code varchar(50) entity_model varchar(255) .. ..
  • 16. Magento uses the EAV model Is he going to go through all those tables?! Nope!
  • 17. But, it worth mentioning {entity_type_code}_entity {entity_type_code}_entity_{dataType}
  • 18. How to create EAV Model in Magento
  • 19. How to create EAV Model in Magento ❏ Define a model in config.xml <global> <!-- ... --> <models> <!-- ... --> <complexworld> <class>Alanstormdotcom_Complexworld_Model</class> <resourceModel>complexworld_resource_eav_mysql4</resourceModel> <resourceModel>complexworld_resource_eav_resource</resourceModel> </complexworld> <!-- ... --> </models> <!-- ... --> </global> ❏ Notice the <resourceModel/> node ❏ EAV: {model}_resource_eav_mysql4 ❏ Normal: {model}_mysql4 was deprecated after 1.6.x.x ❏ Notice: {model}_mysql4 =>{model}_resource source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
  • 20. How to create EAV model in Magento - usual steps ❏ inform Magento about your resource <models> <!-- ... --> <complexworld_resource_eav_mysql4> <class>Alanstormdotcom_Complexworld_Model_Resource_Eav_Mysql4</class> <class>Alanstormdotcom_Complexworld_Model_Resource_Eav_Resource</class> <entities> <eavblogpost> <table>eavblog_posts</table> </eavblogpost> </entities> </complexworld_resource_eav_mysql4> <!-- ... --> </models> source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
  • 21. How to create EAV Model in Magento - Create your classes ❏ Model class class Alanstormdotcom_Complexworld_Model_Eavblogpost extends Mage_Core_Model_Abstract { protected function _construct() { $this->_init('complexworld/eavblogpost'); } } ❏ Model’s resource classes class Alanstormdotcom_Complexworld_Model_Resource_Eav_Mysql4_Eavblogpost extends Mage_Eav_Model_Entity_Abstract { public function _construct() { $resource = Mage::getSingleton('core/resource'); $this->setType('complexworld_eavblogpost'); //entity_type_code $this->setConnection( $resource->getConnection('complexworld_read'), $resource->getConnection('complexworld_write') ); } } EAV:Mage_Eav_Model_Entity_Abstract Normal: Mage_Core_Model_Resource_Db_Abstract (+) source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
  • 22. How to create EAV Model in Magento - setup script In order to make our Module working we need to insert Row in eav_entity_type, eav_attribute_group and eav_attribute_set, which can be manual or Automated source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
  • 23. How to create EAV model in Magento - setup script ❏ Create setup script <resources> <!-- ... --> <complexworld_setup> <setup> <module>Alanstormdotcom_Complexworld</module> <class>Alanstormdotcom_Complexworld_Entity_Setup</class> </setup> <connection> <use>core_setup</use> </connection> </complexworld_setup> <!-- ... --> </resources> ❏ setup classes will be extending Mage_Eav_Model_Entity_Setup rather than Mage_Core_Model_Resource_Setup class Alanstormdotcom_Complexworld_Entity_Setup extends Mage_Eav_Model_Entity_Setup { source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
  • 24. How to create EAV Model in Magento - Configure new Entity ❏ In the setup class public function getDefaultEntities() { return array ( 'complexworld_eavblogpost' => array( 'entity_model' => 'complexworld/eavblogpost', 'attribute_model' => '', 'table' => 'complexworld/eavblogpost', 'attributes' => array( 'title' => array( 'type' => 'varchar', 'backend' => '', 'frontend' => '', 'label' => 'Title', 'input' => 'text', 'class' => '', 'source' => '', 'global' => 0, 'visible' => true, 'required' => true, 'user_defined' => true, 'default' => '', 'searchable' => false, 'filterable' => false, 'comparable' => false, 'visible_on_front' => false, 'unique' => false, ), ), ) ); } source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/ After running the script we’ll get new row in eav_attribute and eav_entity_attribute
  • 25. How to create EAV model in Magento - Data set/get ❏ Set a value $weblog2 = Mage::getModel('complexworld/eavblogpost'); $weblog2->set{AttributeCode}(‘value’); $weblog2->setTitle(‘value’); $weblog2->save(); ❏ Get a value $weblog2 = Mage::getModel('complexworld/eavblogpost'); $entries = $weblog2->getCollection() ->addAttributeToSelect('{AttributeCode}'); $entries = $weblog2->getCollection() ->addAttributeToSelect('title'); Take care by using $weblog2->getCollection()->addAttributeToSelect(*); source:http://alanstorm.com/magento_advanced_orm_entity_attribute_value_part_1/
  • 26. Really flexible Even though it sometimes causes headache ❏ Performance ❏ Changes in datatype ❏ Manual imports ❏ 3rd Party User Complexity