Magento Database

piaoling  2011-06-13 19:03:33

Magento Database Diagrams 1.0.x / 1.1.x / 1.2.x / 1.3.x

 

Sample Magento Database Diagram

sample database diagram

The above image is only a low-resolution diagram example. Actual high resolution Magento database diagrams can be downloaded here.

The 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)

Magento Database Downloads

 
Database Diagram Files for Magento v1.0, v1.0.19700, & v1.0.19870 — [Updated 2008_05_01]
MAGENTO_v1.0.19700---Database Diagram.zip
File Name File Description
MAGENTO v1.0.19700 - Database Diagram.pdf PDF DB Diagram - Color
MAGENTO v1.0.19700 - Database Diagram_BW.pdf PDF DB Diagram - Black&White
MAGENTO v1.0.19700 - Database Diagram 3×3.pdf PDF DB Diagram - 9 Page Fmt
MAGENTO v1.0.19700 - Database Diagram 4×4.pdf PDF DB Diagram - 16 Page Fmt
MAGENTO v1.0.19700 - Database Objects.xls Database Object Spreadsheet
MAGENTO v1.0.19700 - Database Schema [SpacedFormat].sql Magento Schema
Database Diagram Files for Magento v1.1.1, 1.1.2, 1.1.3, & 1.1.4 — [Updated 2008_07_29]
MAGENTO_v1.1.1---Database Diagram.zip
File Name File Description
MAGENTO v1.1.1 - Database Diagram.pdf PDF DB Diagram - Color
MAGENTO v1.1.1 - Database Schema.sql Magento Schema SQL
Database Diagram Files for Magento v1.1.5 & v1.1.6 — [Updated 2008_09_17]
MAGENTO_v1.1.6---Database_Diagram.pdf
File Name File Description
MAGENTO_v1.1.6—Database_Diagram.pdf PDF DB Diagram - Color
Database Diagram Files for Magento v1.1.7 & v1.1.8 — [Updated 2008_12_13]
MAGENTO_v1.1.8---Database_Diagram.zip
File Name File Description
MAGENTO_v1.1.8—Database_Diagram.pdf PDF DB Diagram - Color
MAGENTO_v1.1.8—Database_Diagram_BW.pdf PDF DB Diagram - B & W
Database Diagram Files for Magento v1.2.0 — [Updated 2009_01_17]
MAGENTO_v1.2.0.2---Database_Diagram.zip
File Name File Description
MAGENTO_v1.2.0.2—Database_Diagram.pdf PDF DB Diagram - Color
MAGENTO_v1.1.8 to v1.2.0.2—Change Summary.txt Change Summary 1.1.8 to 1.2.0.2
Database Diagram Files for Magento v1.2.1 (incl. 1.2.1.1 & 1.2.1.2) — [Updated 2009_02_03]
MAGENTO_v1.2.1---Database_Diagram.zip
File Name File Description
MAGENTO_v1.2.1—Database_Diagram.pdf PDF DB Diagram - Color
MAGENTO_v1.2.0.2 to v1.2.1—Change Summary.txt Change Summary 1.2.0.2 to 1.2.1
Database Diagram Files for Magento v1.3.2.4 — [Updated 2009_10_03]
MAGENTO_v1.3.2.4---Database_Diagram.pdf
File Name File Description
MAGENTO_v1.3.2.4—Database_Diagram.pdf PDF DB Diagram - Color

Post comments, suggestions, and correction requests here (Magento Database Forum)...

Magereverse - Magento Database Diagram Online

 

MAGEREVERSE is an online Database Diagram Tool dedicated to Magento eCommerce.

http://www.magereverse.com/

Magereverse Main Goals

  • provide a db diagram tool online
  • ready to use for all Magento versions
  • highlight table relations

Magereverse DB Diagram and SQL Structure

Available Magento Versions :

  • 1.5.1.0 rc1
  • 1.5.0.1
  • 1.5.0.0 rc1
  • 1.4.2.0
  • 1.4.1.1
  • 1.4.1.0
  • 1.4.0.1
  • 1.3.3.0
  • 1.3.2.1

http://www.magereverse.com

from:http://www.magentocommerce.com/wiki/2_-_magento_concepts_and_architecture/magento_database_diagram

类别 :  magento(258)  |  浏览(3851)  |  评论(0)
发表评论(评论将通过邮件发给作者):

Email: