Magento 2 – Purpose of the catalog_eav_attribute Table

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 the eav_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 the eav_attribute table. The link is made based on the attribute_id field.
Each attribute's properties are determined by the fields in the eav_attribute table plus the fields in catalog_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.

Related Topic