The Moodle 3.0 Database Schema "reverse engineered" from the installed database using
MySQL Workbench For more about Moodle see
For more about the Moodle database system see
Marcus Green 2016

A Mysql MWB File that can be modified. moodle30_erd.mwb .This file contains additional diagrams that show some of the modules in more detail.
A pdf rendering moodle30_erd.pdf. A set of images of individual components of the diagram components

How the diagram was created, Diagram FAQ. See here for an archive of  old versions

Moodle 3.0 ER Diagram assignment badge badge course forum grading lesson message question_bank question_types roles quiz wiki workshop