Magento Database – Eav table description

We will see here, magento EAV tables is how working,now will take one tabled called “eav_entity_type

This table explain about the type of the entity. Here each entity explain about the appropriate details which we used in our magento website.Entity is
Customer – customer related data
customer_address – customer address related data
catalog_category – category details
catalog_product – product details
order – Order details
invoice – Invoice details
creditmemo – creditmemo details
shipment – shipment details

From the above example, i will pick one entity and i explain (which was i understood)
If you see this table , entity_type_code column value is “catalog_product”. At same row, entity_model is “catalog/product”.

Normally if you want to get any product information means we will use below code. here we are going to use this entity_model only
Mage::getModel(‘catalog/product’)->load (PRODUCTID). This code will give all the detail about by given product ID.

entity_table is “catalog/product“. This column will define, what and all related to product details, we will get from starting of catalog_product_…….. tables.

Above entity are magento default entities. If you want any custom entity, we can create. How ? normally, if you create any custom module (own module), we will follow some structure, like create app folder, XML file, block,model,controller,etc files. If you mention your customer model in model file we call by given given model name like getModel(‘CUSTOM/CUSTOM‘). But if you want to create entity in this table, we have to follow some long steps, then only it will create in this table. We have create a model as per the magento model creation (creation of magento attribute) .