How Magento uses EAV in Database Architecture – Part 1


A database is a term we all have heard a lot of times from different people, but what actually is a database? Talking in layman’s language we can say that it’s a storage mechanism for storing the data. But, in technical terms it is the backbone of all the applications, be it mobile applications, web applications or system applications. Databases store the interaction of the users and keep the data intact into a relational schema, for reusability.

Hence we can say that no application is a complete application without a database.

How Magento uses it

For an application platform like Magento, having a market share of about 30% in the e-commerce business, the database is a key element and needs to be scalable, optimized, secure, and customizable. Since Magento provides high scalability (one of the major reason for such high market coverage), accordingly the database should be highly customizable. In order to achieve all the above specifications, Magento selected the EAV-Model to be the best applicable database model for this scenario. Since there are many debates on the acceptability of the Eav as compared to Flat tables, you can weigh the pros and cons of it explained ahead in the blog.

The EAV model used by Magento has three components.

Before we go into Magento database and architecture, let's discuss them taking a real-life example.