Page: () 1 ... 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ... 76 ()

An ER Diagram for the Moodle Database

Understanding the Moodle database can be difficult. I have produced an ER (Entity Relationship) showing the relationships between the tables in a fresh install of Moodle. The diagram is mainly "reverse engineered", i.e. automatically generated from the Moodle code that creates the database at install time.

In addition to the relationships in the code, other relationships have been extrapolated from the functionality of the PHP code and a bug tracker item has been created to suggest their inclusion in core Moodle.

The tables have been grouped according to Moodle function, i.e. a group of tables related to the assignments, courses quiz etc.

It is mainly of use to developers and people creating queries (e.g. using the ad-hoc query plugin). It is of little interest to non developers apart from as an illustration of the size and complexity of the database of an installed instance of Moodle.

It is a big diagram representing over 300 tables and the items are legible when printed as an A1 poster. Note that this is the whole core Moodle database not the database activity.

The home of the diagram (and related documents and sub-diagrams) 

Presented by...

Marcus Green


Submitted by:
Marcus Green
Last modified: Friday, 12 February 2016, 12:06 AM
Email address:
[email protected]
Presentation slides: Image (PNG) moodle30_erd.png
Slides visiblity:
Your educational sector:
Roles in which you usually use Moodle:
Type of presentation: Poster
Relevant to audience from which sectors: Education
Relevant to audience in which roles: Developer
Permission: By submitting, I grant permission to promote, record and share my presentation before and after the MoodleMoot.
Committment: Should my proposed presentation be accepted, I commit to attend the MoodleMoot to present it.
Page: () 1 ... 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ... 76 ()