Database Structure

Database Structure

Visualising the Pluto LMS Database:

The below graphic will help you visualize how each database table connects to the other. Some important notes:
  1. This is a simplified graphic and in many instances you can have more than one connection across tables. Each connection was not included otherwise the graphic would become difficult to read. 
  2. The blue boxes represent database tables that primarily link to user data 
  3. The red boxes represent database tables that primary link to course data

Each table contains columns and rows. The sample data below will help you understand what information is included in each table. 

Database Tables:

Note: The table below is sample data (with limited numbers of rows shown). Your actual LMS instance will contain more data.

Each tab represents a database table. When creating an SQL query, the tab name will need to be referenced when querying data from the respective tables. These will be used in your FROM statement within your SQL SELECT query. Click here to learn more.

You can download Sample Data in Excel at the bottom of this page.

Tables Explained:


Table of users on LMS with associated information.


Table of courses on LMS with associated information.


Table of completed modules within course, course progress and completion time for each course per user.


Table of all logs on LMS site. 


Table of all branches and associated information.


Table of all branch members and  associated information.


Table of all custom profile fields on LMS. 


Table of all profile fields associated to users. 


Table of users and their course enrollment and completion times. 


Table of modules associated to courses. 


Table of modules and associated information. 


Table of modules and completion information.


Table of all enrollment types.


Table associating users to the enrollment types. 


Table of all calendar events within your LMS. 


Table of all SCORM files within your LMS.


Table of all SCORM data with user association.


Table of all badges on your LMS.


Table of all badges linked to users.


Table of all roles on your LMS.


Table of all roles assigned to users.


Table of all grades assigned to users.


Table of all graded items within your course.


Table of all groups within your LMS courses.


Table of all graded items within your course.

    • Related Articles


      mod_scorm_get_scorm_user_data  Arguments scormid (Required)         scorm instance id General structure int   //scorm instance id REST (POST parameters) scormid= int attempt (Required)         attempt number General structure int   //attempt number ...
    • Course Completion API

      core_completion_get_activities_completion_status Arguments courseid (Required)         Course ID General structure int   //Course ID REST (POST parameters) courseid= int userid (Required)         User ID General structure int   //User ID REST (POST ...
    • SQL Query Basics

      Below is an example of a very basic SQL query: SELECT AS 'id',   u.username AS 'username', u.firstname AS 'first name', u.lastname AS 'last name', AS 'email' FROM prefix_user AS u  WHERE > 2 The SELECT statement is used to select ...
    • Grades API

      gradereport_overview_get_course_grades Arguments userid (Default to "0")         Get grades for this user (optional, default current) General structure int  Default to "0" //Get grades for this user (optional, default current) REST (POST parameters) ...
    • Enrollment API

      enrol_manual_enrol_users Arguments enrolments (Required) General structure list of (  object { roleid int   //Role to assign to the user userid int   //The user that is going to be enrolled courseid int   //The course to enrol the user role in ...