Page tree
Skip to end of metadata
Go to start of metadata

This article has been shortened considerably because of the age of the information. Access an archive here.

he Magento "EAV" Data Model

A short note regarding Magento database design: For purposes of flexibility, the Magento database heavily utilizes an Entity-Attribute-Value (EAV) data model. As is often the case, the cost of flexibility is complexity - Magento is no exception. The process of manipulating data in Magento is often more “involved” than that typically experienced using traditional relational tables. Therefore, an understanding of EAV principles and how they have been modeled into Magento it is HIGHLY recommended before making changes to the Magento data or the Magento schema (Wikipedia: Entity-attribute-value_model). Varian has simplified the identification of EAV related tables with consistent naming conventions. Core EAV tables are prefixed with “EAV_”. Diagrams in this post contain a section labeled “EAV” which displays Magento’s core EAV tables and thier relationships to non-EAV tables.

Diagram Scope

Database diagrams and documents found in this post are intended to mirror the database schema as defined by Varien. Table relationships depicted in the diagrams represent only those relationships explicitly defined as Foreign Keys in the Magento database. Additional informal/undiagrammed table relationships may also exist, so when modifying the schema or directly manipulating data it is important to identify and evaluate possible changes to these tables as well (and the tables they relate to, and the tables they relate to...).

Diagram Format

The diagram is formatted to give a quick overview of the Magento system tables and their fundamental relationships. The layout style is conceptual and a design used more for quick reference rather than detailing every aspect of the database. I apologize to some in advance for the odd “table type color scheme” idea and the grouping of “foreign key table reference lines” as these are not standard diagram techniques - a personal preference. Note that the database diagram is a searchable PDF document so table and column objects can be located within the diagram using Acrobat’s search capabilities.

Diagram Printing

If you choose to print the database diagram it is recommended you do so across multiple pages. The number of pages will depend on the level of detail required and the quality of your printer.

A general guideline for setting the print scale in Adobe Acrobat:

To see text at the TABLE level requires 2×2 pages or greater (approx scale 45%)

To see text at the COLUMN level requires 4×4 pages or greater (approx scale 85%)

Printing across multiple pages(based on Acrobat 8.1 Pro - options may vary by version):

  1. Open Acrobat print dialog
  2. Select a printer
  3. Locate the Page Scaling option and select “Tile all pages”
  4. Locate the Tile Scale value and set your desired value (see above)
  5. Locate the Overlap value and enter a value of 10 (optional)

(You may wish to print the first page to verify you can see what you need to see before printing the entire document)

Magereverse database diagrams.

  • No labels