Database Structure

Database Structure

Overview 

Pluto LMS stores all LMS data in an SQL database on a secure server. The Custom Reports tool provided by Pluto LMS allows you to query this database in order to create custom reports as required by your organisation. 

Note:
Pluto LMS does not offer services to build the queries for you. Please consult a 3rd party consultant or use an in-house SQL developer if you are not able to build SQL queries. (Guides to SQL here)  

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 tables below are sample data (with limited numbers of rows shown). Your actual LMS instance will contain more data. We have also only included the important or useful columns required to create custom reports. 

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

Unless stated otherwise: 0 often represents "False" or "No" (i.e., the condition is not met), whereas 1 often represents "True" or "Yes" (i.e., the condition is met).

prefix_user:

Table of all users on the LMS with associated information. This table is used to store all user information. 

idauthdeletedsuspendedusernamefirstnamelastnameemailcitycountryfirstaccesstimecreatedtimemodified
2512manual10managerSite AdminDemomanager@plutolms.comNew YorkUS158883555415888355181615376366
2513manual10studentdemo1Student1Demostudent@plutolms.comSeattleUS158884018715888401751620883019
2539manual01studentdemo2Student2Demostudent+noreply1@plutolms.comTorontoCA159074268015907426501620886280
2550manual00studentdemo3Student3Demostudent+noreply2@plutolms.comMiamiUS159196783115919676921620886270

id: A system generated unique identifier for the specific user (primary key)
auth: The authentication method assigned to the user which grants them access to the LMS
deleted: 1 = User profile has been deleted, 0 = User profile is active
suspended: 1 = User profile has been suspended, 0 = User profile is active
username: Unique username of the user
firstname: The first name of the user 
lastname: The last name of the user
email: The email address of the user
city: The city of the user
country: The country of the user
firstaccess: The first time the user logged into the site (Unix)
timecreated: The time the user created on the site (Unix)
timemodified The time the user was modified the site (Unix)

prefix_user_info_field:

This table contains a list of all user profile fields. This table is used to link custom profile field information to the user profile. 

idshortnamename
1organisationOrganisation
2departmentDepartment

id: A system generated unique identifier for the profile field (primary key)
shortname: The shortname of the profile field
name: The full name of the profile field 

prefix_user_info_data:

This table contains the field values for each user. This table is used to link user specific field values to the custom profile field. 

iduseridfieldiddata
125131Organisation A
225851Organisation A
325871Organisation A
425502Department B
525392Department A
625132Department A
725841Organisation A
825842Department A
925852

id: A system generated unique identifier for the field value (primary key)
userid: The id of the system user (foreign key: id column in prefix_user)
fieldid: The profile field id (foreign key: id column in prefix_user_info_field)
data: The profile field value

prefix_user_lastaccess:

This table contains when each user last accessed a particular course. This table can be used to see when a user last accessed a course. 

iduseridcourseidtimeaccess
123541531619090191
225491541625632607
334971551535793274

id: A system generated unique identifier for the last course access of user (primary key)
userid: The id of the system user (foreign key: id column in prefix_user)
courseid: The id of the course (foreign key: id column in prefix_course)
timeaccess: The last time the user viewed the course (Unix)

prefix_course:


Table of courses on LMS with associated information. When a new course is created, it gets added to this table so that you can view course details. 

idcategoryfullnameshortnamestartdateenddatetimecreatedtimemodified
10LMSLMS0014488298901628061040
346112List FormatList Format1606860000016069025401629531242
351112Topics FormatTopics Format1606860000016070588351629531362
372112Social FormatSocial Format1629496800016295300971629530649
373112Single Activity FormatSingle Activity Format1629496800016295307741629530774

id: A system generated unique identifier for the specific course (primary key)
category: The course category id. 
fullname: The fullname of the course
shortnameThe fullname of the course
startdate: The start time of the course (Unix)
enddate: The end time of the course (Unix)
timecreated: The time the course was created (Unix)
timemodified: The time the course was modified (Unix)

prefix_edwreports_course_progress:


Table of completed modules within course, course progress and completion time for each course per user. This table can be used to report on user course progress as a percentage as well as identify when they completed that particular course. 

idcourseiduseridcompletedmodulestotalmodulesprogresscompletiontime
63462539294,129,422,95422131627165540
11351253929,762,972728NULL
14346258429,412,9422291628165540
203462550NULL220NULL

id: A system generated unique identifier for the course progress data (primary key)
courseidThe id of the course (foreign key: id column in prefix_course)
useridThe id of the system user (foreign key: id column in prefix_user)
completedmodules: The ids of completed activities within that course (foreign key: id column in prefix_course_modules)
totalmodules: The total amount of activities within that course
progress: The percentage of activities completed within that course
completiontimeThe time the course was completed (Unix)

prefix_logstore_standard_log:


Table of all logs on LMS site. Every action taken on your LMS site will be listed here. Logs are not erased. 

ideventnamecomponentactiontargetuseridcourseidtimecreatedip
194145\core\event\user_loggedincoreloggedinuser201631260107197.311.34.18
194146\core\event\course_viewedcoreviewedcourse21163126010816.201.3.100
57935\core\event\user_loggedoutcoreloggedoutuser201631260107197.311.34.18
57944\core\event\user_createdcorecreateduser201631260107197.311.34.18
57947\core\event\dashboard_viewedcorevieweddashboard21163126010816.201.3.100
57948\core\event\course_category_viewedcoreviewedcourse_category201631260107197.311.34.18
57957\core\event\badge_awardedcoreawardedbadge201631260107197.311.34.18
57958\core\event\notification_sentcoresentnotification21163126010816.201.3.100
57972\core\event\user_profile_viewedcorevieweduser_profile201631260107197.311.34.18

id: A system generated unique identifier for the log (primary key)
eventname: The action that took place for this log
component: Where the log was actioned 
action: The specific action associated to the log 
targetThe specific target associated to the action
userid: The user id associated to the action (foreign key: id column in prefix_user)
courseidThe course id associated to the action (foreign key: id column in prefix_course)
timecreatedThe time the log was created (Unix)
ip: The IP address associated to the log

prefix_cohort:


Table of all user segments and associated information. Note that the database "cohort" reference = "user segment" on the LMS interface. 

idnametimecreated
25Branch A1595310679
26Branch B1595310710
29Branch C1595311171

id: A system generated unique identifier for the user segment (primary key)
name: The name of the user segment
timecreated: The time the user segment was created (Unix)

prefix_cohort_members:


Table of all user segment members and  associated information. This table links users to the respective user segment. 

idcohortiduseridtimeadded
152625391595310725
162925501595311221
362925871626870098
37292513
1626870098


id: A system generated unique identifier for the specific user within the user segment (primary key)
cohortid: The ID of the user segment (foreign key: id column in prefix_cohort)
userid: The ID of the system user within that user segment (foreign key: id column in prefix_user)
timeadded: The time that the user was added to the user segment (Unix)

prefix_course_completions:

Table of users and their course completion times. 

iduseridcoursetimeenrolledtimecompleted
2825123511607058913NULL
2925133511607058913NULL
33251334601615360202
3425393460NULL

id: A system generated unique identifier for the course completion (primary key)
userid: The ID of the system user  (foreign key: id column in prefix_user)
course: The ID of the course  (foreign key: id column in prefix_course)
timeenrolled: The time the user enrolled into the course (Unix)
timecompleted: The time the user completed the course (Unix)


prefix_course_modules:


Table of modules (activities) associated to courses. Note that the database "module" reference = an "activity" on the LMS interface. These are the activities within your courses. 

idcoursemoduleinstanceaddedvisiblegroupmodecompletioncompletionview
1819314490831121000
2931346917016069025401000
293334615816069030851021
293434615916069031821021
2937346151116069034931021
2941346151516069780221021
2942346151616069789691021
2943346151716069797771021

id: A system generated unique identifier for the course activity (primary key)
course: The ID of the course  (foreign key: id column in prefix_course)
module: The ID of the course activity type (foreign key: id column in prefix_modules)
instance: The instance ID of the specific activity 
added: The time the activity was added to the course (Unix)
visible: 1 = Activity is visible to learners, 0 = Activity is not visible 
groupmode: 1 = The activity group mode is on, 0 = The activity group mode is off
completion: 1 or 2 = The completion settings have been enabled for this activity and 0 = completion settings are off
completionview1 = The completion view has been enabled for this activity and 0 = completion view is off

prefix_modules:


Table of activity types and associated information. 

idname
1assign
7feedback
8folder
9forum
10glossary
14lti
15page
16quiz
17resource
18scorm
20url
34customcert
37attendance
39webexactivity
40zoom
41hvp
42googlemeet
43bigbluebuttonbn
44reservation
45lessonspace
46msteams
47skype
48journal

id: A system generated unique identifier for the activity type (primary key)
name: The name of the activity type

prefix_course_modules_completion:


Table of activity completion information. This table links users to course activity completions. 

idcoursemoduleiduseridcompletionstateviewedtimemodified
55533249111529959834
65393456111529959881
75512384111529959901
85572984001529959918
95563456001529959939
105582384011529959958
115591937011529959977

id: A system generated unique identifier for the specific activity completion (primary key)
coursemoduleid: The ID of the activity (foreign key: id column in prefix_course_modules)
userid: The ID of the system user (foreign key: id column in prefix_user)
completionstate0 = Activity is not complete (pass not specified)1 = Activity is complete (pass not specified), 2 = Activity is complete (with pass), 3 = Activity is complete (not passed) [The pass criteria is defined within the specific activity settings]
viewed: 1 = Activity has been viewed by the user, 0 = Activity has not been viewed by the user
timemodified: The time the activity completion or view was modified (Unix)

prefix_enrol:

Table of all enrollment types. This table displays the different types of enrollments setup for each LMS course. 

idenrolcourseidenrolstartdateenrolenddateroleidtimecreatedtimemodified
848manual34600516069025401606902540
858guest35100516070588351607058835
888apply37200516295300971629530097
889self37300516295307741629530774
890lti34600016318027531631802753

id: A system generated unique identifier for the enrollment type (primary key)
enrol: The type of enrollment 
courseid: The ID of the course to which the enrollment is associated (foreign key: id column in prefix_course)
enrolstartdate: The enrollment start date for that course (Unix)
enrolenddateThe enrollment end date for that course (Unix)
roleid: The role ID associated to the enrollment (foreign key: id column in prefix_role)
timecreated: The time the enrollment type was created in that course (Unix)
timemodifiedThe time the enrollment type was modified in that course (Unix)


prefix_user_enrolments:


Table associating users to the enrollment types. This table links users to the specific course enrollments. 

idenroliduseridtimestarttimeendtimecreatedtimemodified
7384825121606978999016069790161606979016
7484825131606978999016069790161606979016
7584825391606978999016069790161606979016
7785825121607058899016070589131607058913
7885825131607058899016070589131607058913
7985825391607058899016070589131607058913
8085825501607058899016070589131607058913
8384825841612780999016127810591612781059
8884825871620886199016208862061620886206
8984825501620886199016208862061620886206

id: A system generated unique identifier for the user enrollments (primary key)
enrolid: The associated enrollment id  (foreign key: id column in prefix_enrol)
userid: The ID of the system user (foreign key: id column in prefix_user)
timestart: The start time of the enrollment for that user (Unix)
timeendThe end time of the enrollment for that user (Unix)
timecreatedThe time the enrollment was created (Unix)
timemodifiedThe time the enrollment was modified (Unix)

prefix_event:


Table of all calendar events within your LMS. These events can be found on the LMS calendar interface. 

idnamedescriptionformatcategoryidcourseidgroupiduseridrepeatidmodulenameinstancetypeeventtypetimestarttimedurationtimesortvisiblesequencetimemodifiedsubscriptionidprioritylocation
1Happy New Year!This is a description101020000site14489640000NULL111449072094NULLNULLNULL
5My BirthdayIt's my birthday!10002000user15874675740NULL111587468785NULLNULLNULL

prefix_scorm:


Table of all SCORM files within your LMS.

idcoursenamereferenceversionmaxgradegrademethodwhatgrademaxattemptforcecompletedforcenewattemptlastattemptlockmasteryoverridedisplayattemptstatusdisplaycoursestructureupdatefreqrevisionlaunchskipviewhidebrowsehidetocnavnavpositionleftnavpositiontopautopopupoptionswidthheighttimeopentimeclosetimemodifiedcompletionstatusrequiredcompletionscorerequiredcompletionstatusallscosdisplayactivitynameautocommit
4351SCORM Samplescormfile.zipSCORM_1.21001000001000182131-100-1000010001000001629531059NULLNULL001
5351SCORM Quiz Examplescormfile2.zipSCORM_1.210010000010001102131-100-1000010001000001629531063NULLNULL001


prefix_scorm_scoes_track:


Table of all SCORM data with user association.

iduseridscormidscoidattemptelementvaluetimemodified
81825125101cmi.core.exitsuspend1607603576
81925125101cmi.core.lesson_statuspassed1607607696
82025125101cmi.core.total_time0:00:191607607696
82125125101x.start.time16075784921607603576
8222512481cmi.core.exitsuspend1607603576
8232512481cmi.core.lesson_statusincomplete1607603576
8242512481cmi.core.total_time0:38:561626872879
8252512481x.start.time1607578486

prefix_context:


A list of contexts to an instance ID. 

idcontextlevelinstanceid
1100
2501

prefix_badge:


Table of all badges on your LMS.

idnamedescriptiontimecreatedtimemodifiedusercreatedusermodifiedissuernameissuerurlissuercontactexpiredateexpireperiodcourseidmessagesubject
4100% quiz scoreCongratulations - you win a badge for obtaining 100% in your quiz score15354774091537970050417417Pluto LMShttps://plutolms.cominfo@plutolms.comNULLNULLNULLCongratulations! You just earned a badge!
16Champion!Awarded to user to participates in course1615279668161527969522Pluto LMShttps://plutolms.cominfo@plutolms.comNULLNULL346Congratulations! You just earned a badge!


prefix_badge_issued:


Table of all badges linked to users.

idbadgeiduseriduniquehashdateissueddateexpirevisibleissuernotifiedissuercontactexpiredateexpireperiodcourseidmessagesubject
3644285d9b24eb2ed19cca7e7b1917f1d5cc6310a3e0ba1537970050NULL1NULLinfo@plutolms.comNULLNULLNULLCongratulations! You just earned a badge!
4144429c5bd45f37d949a57a60b80e3b6091ca5bad56471538081031NULL1NULLinfo@plutolms.comNULLNULL346Congratulations! You just earned a badge!


prefix_role: 


Table of all roles on your LMS.

idnameshortnamedescription
1Site AdminsiteadminSite Admin can update and modify all settings across the site.
2Course CreatorsitecoursecreatorCourse creators can create new courses.
3Course InstructoreditingteacherInstructors can do anything within a course, including changing the activities and grading learners.
4ManagercoursemanagerCourse Managers can teach in courses and grade students, but may not alter activities.
5LearnerlearnerLearners generally have fewer privileges within a course.

id: A system generated unique identifier for the specific role (primary key)
name: The name of the role 
shortname: The shortname of the role 
description: The description of the role

prefix_role_assignments:


Table of all roles assigned to users. This table links users to the role within context. 

idroleidcontextiduseridtimemodified
11131642150707
52161642760401

id: A system generated unique identifier for the role assignment (primary key)
roleid: The ID of the system role (foreign key: id column in prefix_role)
contextid: The context ID of the role assignment (foreign key: id column in prefix_context)
userid: The ID of the system user (foreign key: id column in prefix_user)
timemodified: The time the role assignment was modified 

prefix_grade_grades: 


Table of all grades assigned to users.

iditemiduseridrawgraderawgrademaxrawgrademinrawscaleidusermodifiedfinalgradehiddenlockedlocktimeexportedoverriddenexcludedfeedbackfeedbackformatinformationinformationformattimecreatedtimemodifiedaggregationstatusaggregationweight
119417NULL100NULL417NULL000000NULL0NULL0NULLNULLnovalue0
26417NULL1000NULLNULLNULL000000NULL0NULL0NULLNULLunknownNULL
320417NULL100NULLNULLNULL000000NULL0NULL0NULLNULLnovalue0

prefix_grade_items:


Table of all graded items within your course. These grade items can be found within the course gradebook via the LMS interface. 

idcourseidcategoryiditemnameitemtypeitemmoduleiteminstanceitemnumberiteminfoidnumbercalculationgradetypegrademaxgrademinscaleidoutcomeidgradepassmultfactorplusfactoraggregationcoefaggregationcoef2sortorderdisplaydecimalshiddenlockedlocktimeneedsupdateweightoverridetimecreatedtimemodified
11NULLNULLcourseNULL1NULLNULLNULLNULL100NULLNULL0100010NULL0000014490713141449071314
3155NULLNULLcourseNULL3NULLNULLNULLNULL100NULLNULL0100010NULL0001015336673161533667316
4156NULLNULLcourseNULL4NULLNULLNULLNULL1200NULLNULL0100010NULL0000015338048881533915674

prefix_groups:


Table of all groups within your LMS courses.

idcourseidnametimecreatedtimemodified
1234Team A15593911801559391326
2234Team B15593913751559391446
3345Team C15593929541559393077

id: A system generated unique identifier for the group (primary key)
courseid: The course ID (foreign key: id column in prefix_course)
name: The name of the course group
timecreated: The time the course group was created (Unix)
timemodified: The time the course group was modified (Unix)


prefix_groups_members:


Table of users and their associated groups. 

idgroupiduseridtimeadded
116011559391207
217651559391267
338711559391281

id: A system generated unique identifier for the group members (primary key)
groupid: The ID of the course group (foreign key: id column in prefix_groups)
userid: The ID of the user (foreign key: id column in prefix_user)
timeadded: The time the user was added to the course group

prefix_data:


Table of all data tables linked to courses.

idcoursenametimemodified
133Progress Import1689075976
234Grade Import1689075976

id: A system generated unique identifier for the data table (primary key)
course: The ID of the course where the data table is located (foreign key: id column in prefix_course)
name: The name of the data table
timemodified: The time the data table was last modified

prefix_data_fields:


Table of all data table fields created within data tables.

iddataidtypenametimemodified
53textColumn 11689075976
63textColumn 21689075976

id: A system generated unique identifier for the data table fields (primary key)
dataid: The ID of the data table to which the field is associated (foreign key: id column in prefix_data)
type: The type of field
name: The field name
timemodified: The time the field was modified (Unix) 

prefix_data_records:


Table of all data table records and associated user.

iduseriddataidtimecreatedtimemodified
52316890759761689075976
62316890759761689075976

id: A system generated unique identifier for the data table records (primary key)
userid: The ID of the system user (foreign key: id column in prefix_user)
dataidThe ID of the data table to which the record is associated (foreign key: id column in prefix_data)
timecreatedThe time the record was created (Unix)
timemodifiedThe time the record was modified (Unix)

prefix_data_content:


Table of all data table field inputs and associated fields.

idfieldidrecordidcontent
5263Sample Text
6273Sample Text 2

id: A system generated unique identifier for the data table field values (primary key)
fieldid: The ID of the field  (foreign key: id column in prefix_data_fields)
recordid: The ID of the record  (foreign key: id column in prefix_data_records)
content: The field value 

    • Related Articles

    • Moving Gradebook Items

      OVERVIEW Moving grade book items in an LMS used for internal staff training refers to the process of rearranging or reorganizing the assessment components within the grade book. This feature allows instructors, trainers, or administrators to change ...