Difference between EAV and Flat model

EAV model:- EAV(Entity Attribute Value) is a data model. When we want to add a new field in the table then we do not need to modify the table structure.

Note:- EAV structure for product in magento, product ID is stored in catalog_product_entity_int table, product name in catalog_product_entity_varchar, product price in catalog_product_entity_decimal, product created date in catalog_product_entity_datetime and product description in catalog_product_entity_text table.

Example:- If we want to add a field name is productinfo then we add into catalog_product_entity_varchar.

Difference between EAV model and Flat model
(i) EAV model is very useful when we want to add a field in a table structure, not need to modify the structure. In the Data model, when we add a new field then modify the table structure.

(ii) EAV model is very complex for (select, insert and update query) because we use relation from many tables. The data model is very easy to (select, insert and update query).

(iii) EAV model is slow and the Data model is fast than the EAV model.