Marcus Green – Senior Analyst Developer at Moodle HQ, has updated the Entity Relationship Diagram for Moodle 3.2. The ERD view helps to show the relationship between Moodle modules and each module itself in great detail.
The Moodle 3.2 database schema has been reverse engineered from the source XML files using MySQL Workbench tool. It is the latest in several earlier versions released by Marcus over the years. The ERD diagrams are a great help for Moodle developers to understand how Moodle stores data in tables and how those tables are related.
The main diagram gives an overview of all the standard Moodle sub-systems with table names. For better understanding and maximum benefits, please download the MySQL Workbench (.mwb) file.
Updates in Moodle 3.2 version:
According to Marcus, the new updates in the Moodle 3.2 ERD diagram are:
It has about 58 additional primary/foreign key relationships deduced from column names. Relationships that have been created for the purpose of this diagram are indicated by the presence of the string _erd_ in the name. For example course_modules_erd_course_id is the relationship between the course_modules table and the course table.
You can download the image version, PDF version & .mwb version of the Entity Relationship Diagram for Moodle 3.2.There are also set of images of individual components of the diagramwhich you can check out here.
If you are looking for the ERD diagrams for earlier Moodle versions, you need to check out this archive.