Magento Business Intelligence Help Center

Magento Entity Relationship Diagrams

What is an entity relationship (ER) diagram? An ER diagram is a visualization of tables within a database and how they relate to each other. This article contains a few ER diagrams to help you visualize the relationship between a handful of common Magento database tables.

Note, throughout this article you will see the words join, relationship and path. These words are all used to describe how two tables are connected.

 

Core Magento ER Diagram

This ER diagram represents the relationships among the core tables within a Magento database. By viewing multiple relationships at once, you can see how data would relate across many tables.

The sections below contain ER diagrams specific to two tables at a time. To view a diagram and its accompanying description, click on the header for that section.

One customer can place many orders. The relationship between these two tables is customer_entity.entity_id = sales_flat_order.customer_id

Watch out! customer_entity.entity_id does not equal sales_flat_order.entity_id. The first can be thought of as a "customer_id" and the second can be thought of as an "order_id." You can read more about this in the entity_id section of our Magento: Common Misconceptions article.

Within Magento BI, if the path between these two tables does not already exist, you can create the path within the Data Warehouse tab. Here is a link to another help center article explaining how to create paths. When you are ready to create the path, it will be defined as follows:

One order can contain many items. The relationship between these two tables is sales_flat_order.entity_id = sales_flat_order_item.order_id

Within Magento BI, if the path between these two tables does not already exist, you can create the path within the Data Warehouse tab. Here is a link to another help center article explaining how to create paths. When you are ready to create the path, it will be defined as follows:

One product can be purchased many items. The relationship between these two tables is catalog_product_entity.entity_id = sales_flat_order_item.product

Within Magento BI, if the path between these two tables does not already exist, you can create the path within the Data Warehouse tab. Here is a link to another help center article explaining how to create paths. When you are ready to create the path, it will be defined as follows:

Was this article helpful?
0 out of 0 found this helpful

Comments

Powered by Zendesk