{"id":16243,"date":"2018-07-10T14:29:43","date_gmt":"2018-07-10T12:29:43","guid":{"rendered":"https:\/\/belvg.com\/blog\/?p=16243"},"modified":"2021-02-18T09:24:06","modified_gmt":"2021-02-18T07:24:06","slug":"how-eav-data-storage-works-in-magento-2","status":"publish","type":"post","link":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html","title":{"rendered":"How EAV Data Storage Works in Magento 2"},"content":{"rendered":"\n<p>EAV (Entity-attribute-value) is a model&nbsp;of storing the values of entity attributes in a certain data storage. As a data storage, Magento 2 supports MySQL-compatible databases (like MySQL, MySQL NDB Cluster, MariaDB, Percona and others).<\/p>\n<p><!--more--> <a href=\"#par_1\">The principles of EAV data storage work in Magento<\/a><br>\n<a href=\"#par_2\">What happens when a new attribute is added to the system<\/a><\/p>\n<p>A table of the classical EAV model has 3 columns:<\/p>\n<ol>\n<li>entity (the object to which you want to set the attribute value)<\/li>\n<li>attribute<\/li>\n<li>value<\/li>\n<\/ol>\n<p>In the <strong>Flat<\/strong> model, the attribute values are stored in the same table as the entities, for each attribute, a separate column in the table is created.<\/p>\n<p>In the <strong>EAV<\/strong> model, attribute values are stored in a separate table, where a separate column is not created for each attribute. For each attribute value of an entity, however, a new row is created in the EAV table.<\/p>\n<h2><a id=\"par_1\"><\/a><strong><span style=\"color: #000000;\">The principles of EAV data storage work in Magento<\/span><\/strong><\/h2>\n<p><span style=\"color: #000000;\">The differences between the classic EAV model and the one used by Magento:<\/span><\/p>\n<ol>\n<li>Each attribute is assigned a backend type (varchar, int, text &hellip;).<\/li>\n<li>Each type of EAV entities has a separate table. The types of EAV entities are stored in the eav_entity_type table. The name of the tables in which the entities are stored in the entity_table column.<\/li>\n<li>System EAV entities are stored in the eav_entity table.<\/li>\n<li>Attributes that have the backend type as static are stored in the same table as the entity. These attributes have a global scope.<\/li>\n<li>Each backend type of each entity type has its own table, in which the attribute values are stored. The name of this table is constructed from the pattern {entity_table}_{backend_type}, where entity_table is the name of the entity table, and backend_type is the backend type of the attribute. These tables have the following columns: value_id (int), attribute_id (int), store_id ** (int), entity_id * (int), value (depending on the backend type).<\/li>\n<\/ol>\n<p><span style=\"color: #000000;\">Here is an image for illustrating the connections:<\/span><\/p>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/image5.jpg\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16245\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/image5.jpg\" alt=\"image5\" width=\"976\" height=\"1131\" title=\"How EAV Data Storage Works in Magento 2\"><\/a><\/p>\n<p><span style=\"color: #000000;\">In order to get\/write the attribute value, you need:<\/span><\/p>\n<ol>\n<li>store_id**<\/li>\n<li>entity_id*<\/li>\n<li>entity_table&nbsp;or entity_type_id<\/li>\n<li>attribute_id<\/li>\n<\/ol>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2019\/06\/migration-to-magento-2.png\" width=\"100\" height=\"100\" alt=\"migration to magento 2\" class=\"module_image\" title=\"How EAV Data Storage Works in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento 2 Migration<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento 2 Migration<\/p><a href=\"https:\/\/belvg.com\/migration-to-magento-2\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<p><span style=\"color: #000000;\">If the entity_table is unknown, but you know the entity_type_id, then the entity_table can be obtained from the eav_entity_type table.<\/span><\/p>\n<p><span style=\"font-weight: 400; color: #000000;\">Magento gets the attributes values of the entity with one large SQL query, which is generated using the following algorithm:<\/span><\/p>\n<ol>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Get all attribute tables for a particular entity_type.<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">For each table perform the following:<\/span>\n<ul>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">A <\/span><i><span style=\"font-weight: 400;\">select<\/span><\/i><span style=\"font-weight: 400;\"> subquery is created from the current table, which requests value and attribute_id<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">a condition is added that entity_id = ID of the requested entity*<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">a condition is added for each scope that store_id IN ($scope-&gt;getValue()) **<\/span><\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">sorted by store_id in descending order<\/span><\/li>\n<\/ul>\n<\/li>\n<li style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">UNION ALL is done for all subqueries.<\/span><\/li>\n<\/ol>\n<p><span style=\"color: #000000;\">* The field does not have to be called entity_id. Magento uses $metadata-&gt;getLinkField() to get the name of the field.<\/span><\/p>\n<p><span style=\"color: #000000;\">** The field does not have to be called store_id. Magento uses $scope-&gt;getIdentifier() to get the field name.<\/span><\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-audit\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Audit<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento Audit<\/p><a href=\"https:\/\/belvg.com\/magento-audit\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Visit the page<\/span><\/a><\/div><\/div><\/div>\n<h2><a id=\"par_2\"><\/a><strong><span style=\"color: #000000;\">What happens when a new attribute is added to the system<\/span><\/strong><\/h2>\n<p>When a new attribute is added, new records are created in the database. Similar records are created for each attribute type.<\/p>\n<p>Let&rsquo;s consider some standard types of attributes.<\/p>\n<h4><strong><span style=\"color: #000000;\">Text Field<\/span><\/strong><\/h4>\n<p><span style=\"color: #000000;\">Let&rsquo;s take a look at the example of creating a new attribute of the Text Field type.<\/span><\/p>\n<ol>\n<li><span style=\"color: #000000;\">A new entry is created in the eav_attribute table:<\/span><\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td>attribute_id<\/td>\n<td>entity_type_id<\/td>\n<td>attribute_code<\/td>\n<td>&hellip;<\/td>\n<\/tr>\n<tr>\n<td>154<\/td>\n<td>4<\/td>\n<td>test_code<\/td>\n<td>&hellip;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol start=\"2\">\n<li><span style=\"color: #000000;\">One entry per store view is created in the eav_attribute_label table with the Label of the attribute:<\/span><\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td>attribute_label_id<\/td>\n<td>attribute_id<\/td>\n<td>store_id<\/td>\n<td>value<\/td>\n<\/tr>\n<tr>\n<td>17<\/td>\n<td>154<\/td>\n<td>1<\/td>\n<td>Test label<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ol start=\"3\">\n<li><span style=\"color: #000000;\">A new entry is created in the catalog_eav_attribute table:<\/span><\/li>\n<\/ol>\n<table>\n<tbody>\n<tr>\n<td>attribute_id<\/td>\n<td>frontend_input_renderer<\/td>\n<td>is_global<\/td>\n<td>&hellip;<\/td>\n<\/tr>\n<tr>\n<td>154<\/td>\n<td>NULL<\/td>\n<td>1<\/td>\n<td>&hellip;<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><strong><span style=\"color: #000000;\">Dropdown<\/span><\/strong><\/h4>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/image4.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16247\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/image4.png\" alt=\"image4\" width=\"1119\" height=\"347\" title=\"How EAV Data Storage Works in Magento 2\"><\/a><\/p>\n<p><span style=\"color: #000000;\">The differences with Text Field:<\/span><\/p>\n<ul>\n<li>eav_attribute.frontend_input = &ldquo;select&rdquo;;<\/li>\n<li>eav_attribute.source_model = &ldquo;Magento\\Eav\\Model\\Entity\\Attribute\\Source\\Table&rdquo;;<\/li>\n<li>eav_attribute.backend_type = &ldquo;int&rdquo;;<\/li>\n<li>eav_attribute.default_value = eav_attribute_option.option_id by default;<\/li>\n<li>one&nbsp;row per value is added to eav_attribute_option.<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td>option_id<\/td>\n<td>attribute_id<\/td>\n<td>sort_order<\/td>\n<\/tr>\n<tr>\n<td>210<\/td>\n<td>155<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>211<\/td>\n<td>155<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>212<\/td>\n<td>155<\/td>\n<td>3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<ul>\n<li>Rows are added to eav_attribute_option_value:<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td>value_id<\/td>\n<td>option_id<\/td>\n<td>store_id<\/td>\n<td>value<\/td>\n<\/tr>\n<tr>\n<td>208<\/td>\n<td>211<\/td>\n<td>0<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>210<\/td>\n<td>212<\/td>\n<td>0<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>205<\/td>\n<td>210<\/td>\n<td>1<\/td>\n<td>One<\/td>\n<\/tr>\n<tr>\n<td>207<\/td>\n<td>211<\/td>\n<td>1<\/td>\n<td>Two<\/td>\n<\/tr>\n<tr>\n<td>209<\/td>\n<td>212<\/td>\n<td>1<\/td>\n<td>Three<\/td>\n<\/tr>\n<tr>\n<td>206<\/td>\n<td>210<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h4><strong><span style=\"color: #000000;\">Price<\/span><\/strong><\/h4>\n<p><span style=\"color: #000000;\">The differences with Text Field:<\/span><\/p>\n<ul>\n<li>eav_attribute.frontend_input = &ldquo;price&rdquo;<\/li>\n<li>eav_attribute.backend_model = &ldquo;Magento\\Catalog\\Model\\Product\\Attribute\\Backend\\Price&rdquo;<\/li>\n<li>eav_attribute.backend_type = &ldquo;decimal&rdquo;<\/li>\n<\/ul>\n<h4><strong><span style=\"color: #000000;\">Media image<\/span><\/strong><\/h4>\n<p><span style=\"color: #000000;\">The differences with Text Field:<\/span><\/p>\n<ul>\n<li>eav_attribute.frontend_input = &ldquo;media_image&rdquo;<\/li>\n<\/ul>\n<h4><strong><span style=\"color: #000000;\">Text swatch<\/span><\/strong><\/h4>\n<p><a href=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/image6.png\"><img decoding=\"async\" loading=\"lazy\" class=\"lazy aligncenter size-full wp-image-16248\" src=\"https:\/\/belvg.com\/wp-content\/uploads\/2019\/06\/pixel.png\" data-src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/image6.png\" alt=\"image6\" width=\"792\" height=\"269\" title=\"How EAV Data Storage Works in Magento 2\"><\/a><\/p>\n<p><span style=\"color: #000000;\">The differences with Dropdown:<\/span><\/p>\n<ul>\n<li>catalog_eav_attribute.additional_data have an approximate form {&ldquo;swatch_input_type&rdquo;:&rdquo;text&rdquo;,&rdquo;update_product_preview_image&rdquo;:&rdquo;0&Prime;,&rdquo;use_product_image_for_swatch&rdquo;:0}<\/li>\n<li>Rows are added to eav_attribute_option_swatch<\/li>\n<\/ul>\n<table>\n<tbody>\n<tr>\n<td>swatch_id<\/td>\n<td>option_id<\/td>\n<td>store_id<\/td>\n<td>type<\/td>\n<td>value<\/td>\n<\/tr>\n<tr>\n<td>1<\/td>\n<td>213<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>6<\/td>\n<td>215<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>3<\/td>\n<\/tr>\n<tr>\n<td>2<\/td>\n<td>213<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>1<\/td>\n<\/tr>\n<tr>\n<td>4<\/td>\n<td>214<\/td>\n<td>1<\/td>\n<td>0<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>3<\/td>\n<td>214<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>2<\/td>\n<\/tr>\n<tr>\n<td>5<\/td>\n<td>215<\/td>\n<td>0<\/td>\n<td>0<\/td>\n<td>3<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>This is what EAV model is all about. Please leave your questions in the comment box below if something is unclear. The second part of the EAV topic will be published next week, so stay tuned.<\/p>\n<div class=\"module_in_content_container\"><a href=\"https:\/\/belvg.com\/magento-development\" class=\"link_to_module\" target=\"_blank\" rel=\"noopener\"><\/a><div class=\"module_content\"><img src=\"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2015\/12\/magento-development-services.png\" width=\"481\" height=\"480\" alt=\"magento development services\" class=\"module_image\" title=\"How EAV Data Storage Works in Magento 2\"><div class=\"module_content_part\"><h3 class=\"title\">Magento Development Services<\/h3><p class=\"module_content_text\">Take your online store to the next level with BelVG Magento development<\/p><a href=\"https:\/\/belvg.com\/magento-development\" class=\"link_2_to_module\" target=\"_blank\" style=\"display:inline-block\" rel=\"noopener\"><span class=\"read-more\">Click to visit the page<\/span><\/a><\/div><\/div><\/div>\n<p>Looking for an expert&nbsp;<a href=\"https:\/\/belvg.com\/magento-development\" target=\"_blank\" rel=\"noopener\">Magento 2 development team<\/a>? Turn to BelVG<\/p>\n\n","protected":false},"excerpt":{"rendered":"How the EAV data storage system works in Magneto 2.","protected":false},"author":82,"featured_media":16244,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"image","meta":{"_acf_changed":false,"footnotes":""},"categories":[491,389],"tags":[],"class_list":["post-16243","post","type-post","status-publish","format-image","has-post-thumbnail","hentry","category-magento-2","category-magento2-development","post_format-post-format-image"],"acf":[],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.4 - aioseo.com -->\n\t<meta name=\"description\" content=\"Discover how EAV data storage works in Magento 2. Learn how to add new attribute to the system: text field, dropdown, price, media image, etc.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Andrey Litvin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html\" \/>\n\t\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.4\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#article\",\"name\":\"How EAV Data Storage Works in Magento 2 | BelVG Blog\",\"headline\":\"How EAV Data Storage Works in Magento 2\",\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/How-EAV-Data-Storage-Works-in-Magento-2.jpg\",\"width\":770,\"height\":433},\"datePublished\":\"2018-07-10T14:29:43+02:00\",\"dateModified\":\"2021-02-18T09:24:06+02:00\",\"inLanguage\":\"en-US\",\"commentCount\":9,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#webpage\"},\"articleSection\":\"Magento 2, Magento 2 Development, Image\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"name\":\"Magento 2 Development\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"position\":2,\"name\":\"Magento 2 Development\",\"item\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#listItem\",\"name\":\"How EAV Data Storage Works in Magento 2\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#listItem\",\"position\":3,\"name\":\"How EAV Data Storage Works in Magento 2\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/category\\\/magento2-development#listItem\",\"name\":\"Magento 2 Development\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin\",\"name\":\"Andrey Litvin\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Andrey Litvin\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#webpage\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html\",\"name\":\"How EAV Data Storage Works in Magento 2 | BelVG Blog\",\"description\":\"Discover how EAV data storage works in Magento 2. Learn how to add new attribute to the system: text field, dropdown, price, media image, etc.\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/author\\\/andrey-litvin#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/wp-content\\\/uploads\\\/2018\\\/07\\\/How-EAV-Data-Storage-Works-in-Magento-2.jpg\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html\\\/#mainImage\",\"width\":770,\"height\":433},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/how-eav-data-storage-works-in-magento-2.html#mainImage\"},\"datePublished\":\"2018-07-10T14:29:43+02:00\",\"dateModified\":\"2021-02-18T09:24:06+02:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/belvg.com\\\/blog\\\/\",\"name\":\"BelVG Blog\",\"description\":\"Magento and Prestashop articles\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/belvg.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How EAV Data Storage Works in Magento 2 | BelVG Blog","description":"Discover how EAV data storage works in Magento 2. Learn how to add new attribute to the system: text field, dropdown, price, media image, etc.","canonical_url":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#article","name":"How EAV Data Storage Works in Magento 2 | BelVG Blog","headline":"How EAV Data Storage Works in Magento 2","author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/How-EAV-Data-Storage-Works-in-Magento-2.jpg","width":770,"height":433},"datePublished":"2018-07-10T14:29:43+02:00","dateModified":"2021-02-18T09:24:06+02:00","inLanguage":"en-US","commentCount":9,"mainEntityOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#webpage"},"isPartOf":{"@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#webpage"},"articleSection":"Magento 2, Magento 2 Development, Image"},{"@type":"BreadcrumbList","@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","position":1,"name":"Home","item":"https:\/\/belvg.com\/blog\/","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","name":"Magento 2 Development"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","position":2,"name":"Magento 2 Development","item":"https:\/\/belvg.com\/blog\/category\/magento2-development","nextItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#listItem","name":"How EAV Data Storage Works in Magento 2"},"previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#listItem","position":3,"name":"How EAV Data Storage Works in Magento 2","previousItem":{"@type":"ListItem","@id":"https:\/\/belvg.com\/blog\/category\/magento2-development#listItem","name":"Magento 2 Development"}}]},{"@type":"Organization","@id":"https:\/\/belvg.com\/blog\/#organization","name":"BelVG Blog","description":"Magento and Prestashop articles","url":"https:\/\/belvg.com\/blog\/"},{"@type":"Person","@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author","url":"https:\/\/belvg.com\/blog\/author\/andrey-litvin","name":"Andrey Litvin","image":{"@type":"ImageObject","@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/e1a6e3c80cb940fddb65016d94b015cd951b4a8a9cd7227565131f28ea95c7a0?s=96&d=mm&r=g","width":96,"height":96,"caption":"Andrey Litvin"}},{"@type":"WebPage","@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#webpage","url":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html","name":"How EAV Data Storage Works in Magento 2 | BelVG Blog","description":"Discover how EAV data storage works in Magento 2. Learn how to add new attribute to the system: text field, dropdown, price, media image, etc.","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/belvg.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#breadcrumblist"},"author":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"creator":{"@id":"https:\/\/belvg.com\/blog\/author\/andrey-litvin#author"},"image":{"@type":"ImageObject","url":"https:\/\/belvg.com\/blog\/wp-content\/uploads\/2018\/07\/How-EAV-Data-Storage-Works-in-Magento-2.jpg","@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html\/#mainImage","width":770,"height":433},"primaryImageOfPage":{"@id":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html#mainImage"},"datePublished":"2018-07-10T14:29:43+02:00","dateModified":"2021-02-18T09:24:06+02:00"},{"@type":"WebSite","@id":"https:\/\/belvg.com\/blog\/#website","url":"https:\/\/belvg.com\/blog\/","name":"BelVG Blog","description":"Magento and Prestashop articles","inLanguage":"en-US","publisher":{"@id":"https:\/\/belvg.com\/blog\/#organization"}}]}},"aioseo_meta_data":{"post_id":"16243","title":"How EAV Data Storage Works in Magento 2 | #site_title","description":"Discover how EAV data storage works in Magento 2. Learn how to add new attribute to the system: text field, dropdown, price, media image, etc.","keywords":null,"keyphrases":null,"focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_custom_url":null,"og_image_custom_fields":null,"og_image_url":null,"og_image_width":null,"og_image_height":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_image_url":null,"twitter_title":null,"twitter_description":null,"schema_type":"default","schema_type_options":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null,"created":"2026-11-03 18:37:06","updated":"2026-11-03 18:37:06"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/belvg.com\/blog\/category\/magento2-development\" title=\"Magento 2 Development\">Magento 2 Development<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">\u00bb<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow EAV Data Storage Works in Magento 2\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/belvg.com\/blog\/"},{"label":"Magento 2 Development","link":"https:\/\/belvg.com\/blog\/category\/magento2-development"},{"label":"How EAV Data Storage Works in Magento 2","link":"https:\/\/belvg.com\/blog\/how-eav-data-storage-works-in-magento-2.html"}],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/users\/82"}],"replies":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/comments?post=16243"}],"version-history":[{"count":9,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16243\/revisions"}],"predecessor-version":[{"id":24091,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/posts\/16243\/revisions\/24091"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media\/16244"}],"wp:attachment":[{"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/media?parent=16243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/categories?post=16243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/belvg.com\/blog\/wp-json\/wp\/v2\/tags?post=16243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}