What is the purpose of the catalog_eav_attribute
table?
Is it in any way related to categories and category attributes? If so, how?
databasemagento2
What is the purpose of the catalog_eav_attribute
table?
Is it in any way related to categories and category attributes? If so, how?
Best Answer
catalog_eav_attribute
is an extension of theeav_attribute
table.The
eav_attribute
table contains only the general data for all the attributes of all the EAV entities (category, product, customer, customer address, anything custom).But each EAV entity requires different data for their attributes.
Example "Used in layered navigation". This has no value for the customer attributes but it does for products.
The values in
catalog_eav_attribute
table apply to products and categories attributes only.Each line in the
catalog_eav_attribute
table has a corresponding line in theeav_attribute
table. The link is made based on theattribute_id
field.Each attribute's properties are determined by the fields in the
eav_attribute
table plus the fields incatalog_eav_attribute
.In the same way, there is a table called
customer_eav_attribute
that serves the same purpose for the customer and customer address attributes.