If you’re interested in getting a sense of and understanding the architecture and interrelationships of Moodle, starting by looking at the database schema might give you a good primer. Available at http://www.examulator.com/er/, Moodle 2.2’s Database Schema was reverse engineered and visually displayed so that you can check it out, trace the web and better understand how cohorts relate to users and how external links relate to courses.
The resource was created by Marcus Green back in 2011. For more about the Database structure of Moodle visit http://docs.moodle.org/dev/Database_schema_introduction.
Download the full poster sized image (2858 x 3894):