Moodle 4.0 is the latest version release of the world’s most popular open source LMS. The latest Major release includes a plethora of new features which are focused on improving the User Experience. Marcus Green – Author of the Moodle Gapfill and WordSelect question types recently posted the full documentation and diagrams for the Moodle 4.0.2+ database structure.
The documentation and diagrams also known as ERD diagrams covers all tables and relationships and additional implied PK/FK relationships.
An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as people, objects or concepts relate to each other within a system. ER Diagrams are most often used to design or debug relational databases in the fields of software engineering, business information systems, education and research.
The current ER diagrams information is generated from the Moodle database schema as contained in the Moodle install.xml files. A standard Moodle install discards all field comments and foreign key relationships.
Marcus has been working on the first versions of this documentation since early 2004. He has also a compilation of old versions ER diagrams. You can check out the older versions archive here.