Magento MySQL database diagram
19 Comments 20th OCT 2008 | Posted by Tomislav Bilic in Magento

If you worked with osCommerce, Zen Cart, CRE Loaded or any similar eCommerce platform before, you might find Magento database structure quite confusing when you see it for the first time. I advise you not to rush too much figuring out what is what by glancing through database. Try to spend first few hours getting familiar with some background. 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. Is there something in Magento that is simple from developers point of view?
Data manipulation in Magento is often more knowledge demanding than that typical use of 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). Varien 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.

Download Magento 1.1.6 MySQL database diagram (PDF, 173kb)
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…).
The author of Database Diagram is Gordon Goodwin, IT Consultant. You can see his info in the PDF.
To post code in comments, place your code inside [code] and [/code] tags.


















November 21st, 2008 at 23:23
I can’t believe no one has take the trouble to thank you for this effort.
This is exactly what I have been looking for.
Many thanks,
Harry Pierson
November 24th, 2008 at 11:30
can’t believe someone actually done this! this will surely speed up my progress.
thanks a lot!
November 25th, 2008 at 0:11
YES!!!. Very nice. Very helpful. Thanks again.
December 2nd, 2008 at 23:20
Hi guys,
Sorry for misunderstanding. Let me clarify something. I’m not the author. The Author is Gordon Goodwin, IT Consultant. You can see his info in the PDF.
December 12th, 2008 at 10:27
thanks gordon , and you for publishing
February 19th, 2009 at 14:41
Hey, friend!
Thanks for publishing this, and congrats to Gordon. Astonishing work.
I am afraid I cannot print it in an A4 though *sigh*
March 2nd, 2009 at 7:16
Hi,
Gr8 work n thanks a lot I was looking for exactly same functionality
March 5th, 2009 at 10:28
This is a life saver. I’m sort of disappointed Varien didn’t supply this along with a class diagram themselves. By the way I’m still looking for a comprehensive class diagram.
March 5th, 2009 at 10:32
We all do Sam
July 9th, 2009 at 5:53
Very useful indeed, thx a bunch!
July 9th, 2009 at 22:16
hahahahaha.. long live the relational database!
what a mess..
July 18th, 2009 at 18:25
OMG… thx so much for the diagram!!!!
October 30th, 2009 at 22:27
For update version (Database Diagram Files for Magento v1.3.2.3 & 1.3.2.4 [2009-10-03]) of the database diagram, you can visit http://www.magentocommerce.com/boards/viewthread/7359/
April 7th, 2010 at 7:20
You are an amazing person! What an effort. You saved my day and my store.. i have been juggling with all teh tables so far, without knowing what is meant for what. thanks a ton!
April 7th, 2010 at 11:25
Hey Mera,
Did they really help? I don’t know how could they
Before Magento, database diagram was always the first item we investigated when we started to learn some platform. However, this is totally different. We rarely look into database diagram while working in Magento.
Cheers!
May 20th, 2010 at 15:28
Goddamn, this is awesome
Thank you very much
July 7th, 2010 at 18:01
Feels like looking at a circuit diagram
Considering how much wire an entitiy must traverse, I’m suprised to see that Magento can even run
Sorry for moaning over the slowness before seeing this
July 13th, 2010 at 8:21
Great, cant imagine how helpful it has proved to be to me. Thanks so much
July 26th, 2010 at 10:21
Wow, thanks alot, this is going to save me hours, literally