The EAV table is a database model that is used for some entities in Magento. In this recipe, we will explore the details of the EAV implementation in Magento.
The EAV pattern is used for some entities in Magento such as the product entity. In this recipe, we will make some queries for updating a product using SQL queries. Open your database client and prepare yourself for running some complex queries.
The following steps show you how you can create a query to return the data of a Magento EAV model:
The Magento EAV entities are declared in the
eav_entity_type
table. Run the following query to see which EAV entities are available:SELECT * FROM eav_entity_type;
Remember the ID of the
catalog_product
entity.To get the attributes related to a product, we have to look in the
eav_attribute
table. To see which attributes are related to a product, we have to run the following query:SELECT * FROM eav_attribute WHERE entity_type_id = 10
Make sure
10...