moodle数据库结构_第1页
moodle数据库结构_第2页
moodle数据库结构_第3页
moodle数据库结构_第4页
moodle数据库结构_第5页
已阅读5页,还剩77页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

1、Moodle数据字典编写:小东前言The Moodle database has around 200 tables, and can be quite daunting at first sight.Moodle在线教学系统,有大约200多张表,第一次看到这样的场面,心里肯定会打鼓的。DOCS on : /en/Development:Database_schema_introduction【注释】点击链接可以查看表结构【注释】如果没有特别说明,中文对应的解释是从官网对应位置翻译过来,仅供参考。Moodle系统基本结构图基本模块扩

2、展模块管理系统系统外观用户管理活动、资源语言扩展用户验证个人资料Moodle内置任何人开发的符合标准的主题内置 作业 | 聊天 | 讨论 | 各种课件 | 各种模式 | 考试 |扩展的各种标准内置en_au, 扩展包En_us, zh_cn_tf8等等邮箱验证 | LDAP | 其他.内置个人博客系统Mysql(默认)数据库其他知名数据库表结构详细分析Configuration /参数配置相关 tfmdl_config tfmdl_config_plugins Users and their profiles / 用户相关 tfmdl_user tfmdl_user_info_category

3、 tfmdl_user_info_data tfmdl_user_info_field tfmdl_user_lastaccess 由于性能上的考虑,将tfmdl_user_lastaccess这张表与user表分开设计,单独成为一张表。 tfmdl_user_preferences tfmdl_user_private_key The roles and capabilites system /角色和权限系统 tfmdl_role tfmdl_role_allow_assign tfmdl_role_allow_override tfmdl_role_assignments tfmdl_ro

4、le_capabilities tfmdl_role_names tfmdl_role_sortorder role defines a role, its name, etc. Other parts of the role definition are stored in the role_capabilities and role_context_levels tables. 定义一种角色(含角色名称等等),角色定义的其它详细部分,存放在role_capabilites 和 role_context_levels两张表中。capabilites the various permissio

5、ns that can be granted. 各种各样的权限列表。context a context is a scope in Moodle, for example the whole system, a course, a particular activity. The type is given by contextlevel, and depending on context level, instanceid points to one of a number of different tables. 指定某个角色在某个特定的范围内拥有某种权限。role_allow_assig

6、n which roles can assign which other roles 指定角色能够为哪些其它角色授权(授予某种权限)。 例子:老师可以选择某些用户,作为自己任教课程的学生,课程设计老师可以任用某个老师作为自己设计的某个课程的任课老师。role_allow_override which roles can override which other roles 角色的层级管理。某个角色可以剔除另一种角色(在允许的范围内)。role_allow_switch which roles can switch to which other roles (Moodle 2.0 onwards

7、.) 列出用户拥有的角色,使其可在这些角色中自由转换。role_assignments which users are assigned which roles in which contexts 存储了某个用户被指定了某种角色。role_capabilities the permission for each capability in either a role definition (if contextid points to the system context) or a role override (if contextid points to some other contex

8、t) 记录每种权限的功能。共550多种权限。ORZ.role_context_levels the context levels at which each role can be assigned. (Moodle 2.0 onwards) role_names used to implement the feature where roles can be given different names in different courses (or, more gererally, contexts) 记录自定义角色的名称,可以新增角色的名称,或者更改现有的角色的名称。role_sorto

9、rder is not actually used anywhere in the code! 似乎 这个表是一张从来没有用过的表。The following diagram shows the tables with their columns and the relationships between them, and other tables in Moodle. Courses and their organisation into categories /课程相关 tfmdl_course tfmdl_course_allowed_modules tfmdl_course_cate

10、gories tfmdl_course_display tfmdl_course_meta tfmdl_course_modules tfmdl_course_request tfmdl_course_sections Activities and their arrangement within courses /课程安排modules / 现有支持的课程安排 记录了已经支持的一些课程设计,老师在管理自己的课程时,可以选择到的功能,比如创建一份在线文档,发布一个公共讨论课题,发布作业,上传一份资源等等。course_allowed_modules course_modules course_

11、sections See also the tables belonging to particular activity modules. For example forum_*, quiz_*, etc. Groups and groupings /组 、班级表 tfmdl_groupings tfmdl_groupings_groups tfmdl_groups tfmdl_groups_members The logging system /归档系统 tfmdl_log tfmdl_log_display Blocks system / tfmdl_block tfmdl_block_

12、instance tfmdl_block_pinned tfmdl_block_rss_client tfmdl_block_search_documents Some particular blocks also have their own database tables. For example block_rss_client. Events / 作业系统event_* Backup and restore /备份和恢复 tfmdl_backup_config tfmdl_backup_courses tfmdl_backup_files tfmdl_backup_ids tfmdl_

13、backup_log Statistics /统计表 tfmdl_stats_daily tfmdl_stats_monthly tfmdl_stats_user_daily tfmdl_stats_user_monthly tfmdl_stats_user_weekly tfmdl_stats_weekly Tags /标签标签是允许其他人用哪些词找到自己。 tfmdl_tag tfmdl_tag_correlation tfmdl_tag_instance Gradebook /成绩系统 tfmdl_grade_categories tfmdl_grade_categories_histo

14、ry tfmdl_grade_grades tfmdl_grade_grades_history tfmdl_grade_import_newitem tfmdl_grade_import_values tfmdl_grade_items tfmdl_grade_items_history tfmdl_grade_letters tfmdl_grade_outcomes tfmdl_grade_outcomes_courses tfmdl_grade_outcomes_history tfmdl_grade_settings Question bank and question engine/

15、 问题设置系统。Individual question typesThe following core question types have their own database tables: Calculated /计算题 Matching / 选择题 Multiple choice /多选 Multi-answer (Cloze) / Numerical Random short-answer matching / Short answer /简答 True/false /正误判断 tfmdl_question tfmdl_question_answers tfmdl_question

16、_attempts tfmdl_question_calculated tfmdl_question_categories tfmdl_question_datasets tfmdl_question_dataset_definitions tfmdl_question_dataset_items tfmdl_question_match tfmdl_question_match_sub tfmdl_question_multianswer tfmdl_question_multichoice tfmdl_question_numerical tfmdl_question_numerical_

17、units tfmdl_question_randomsamatch tfmdl_question_sessions tfmdl_question_shortanswer tfmdl_question_states tfmdl_question_truefalse See also the tables for individual question types, which all start question_. Messaging system /message_* Moodle Networkmnet_* / 获得网络支持的。Caching /缓存cache_* Miscellaneo

18、us /其他一些设定项目scale scale_history sessions2 / 设置session 的前缀timezone /设置时区post Activity modules Assignment Chat Choice Data Feedback Forum Glossary Hotpot Label Lesson Quiz Resource SCORM Survey Wiki Authentication plugins . Blocks . Enrolment plugins . Question types Calculated Matching Multiple choic

19、e Multi-answer (Cloze) Numerical Random short-answer matching Short answer True/false 数据库表结构注释:安装的时候,为表配置了前缀tfmdl表的结构 adodb_logsql字段类型Null默认idbigint(10) 是NULLcreateddatetime是NULLsql0varchar(250)是sql1text是NULLparamstext是NULLtracertext是NULLtimerdecimal(16,6)是0.表的结构 tfmdl_assignment字段类型Null默认idbigint(1

20、0) 是NULLcoursebigint(10) 是0namevarchar(255)是descriptiontext是NULLformatsmallint(4) 是0assignmenttypevarchar(50)是resubmittinyint(2) 是0preventlatetinyint(2) 是0emailteacherstinyint(2) 是0var1bigint(10)是0var2bigint(10)是0var3bigint(10)是0var4bigint(10)是0var5bigint(10)是0maxbytesbigint(10) 是timeduebigint(10) 是

21、0timeavailablebigint(10) 是0gradebigint(10)是0timemodifiedbigint(10) 是0表的结构 tfmdl_assignment_submissions字段类型Null默认idbigint(10) 是NULLassignmentbigint(10) 是0useridbigint(10) 是0timecreatedbigint(10) 是0timemodifiedbigint(10) 是0numfilesbigint(10) 是0data1text是NULLdata2text是NULLgradebigint(11)是0submissioncom

22、menttext是NULLformatsmallint(4) 是0teacherbigint(10) 是0timemarkedbigint(10) 是0mailedtinyint(1) 是0表的结构 tfmdl_backup_config字段类型Null默认idbigint(10) 是NULLnamevarchar(255)是valuevarchar(255)是表的结构 tfmdl_backup_courses字段类型Null默认idbigint(10) 是NULLcourseidbigint(10) 是0laststarttimebigint(10) 是0lastendtimebigint(

23、10) 是0laststatusvarchar(1)是0nextstarttimebigint(10) 是0表的结构 tfmdl_backup_files字段类型Null默认idbigint(10) 是NULLbackup_codebigint(10) 是0file_typevarchar(10)是pathvarchar(255)是old_idbigint(10) 是0new_idbigint(10) 是0表的结构 tfmdl_backup_ids字段类型Null默认idbigint(10) 是NULLbackup_codebigint(12) 是0table_namevarchar(30)是

24、old_idbigint(10) 是0new_idbigint(10) 是0infomediumtext是NULL表的结构 tfmdl_backup_log字段类型Null默认idbigint(10) 是NULLcourseidbigint(10) 是0timebigint(10) 是0laststarttimebigint(10) 是0infovarchar(255)是表的结构 tfmdl_block字段类型Null默认idbigint(10) 是NULLnamevarchar(40)是versionbigint(10) 是0cronbigint(10) 是0lastcronbigint(1

25、0) 是0visibletinyint(1)是1multipletinyint(1)是0表的结构 tfmdl_block_instance字段类型Null默认idbigint(10) 是NULLblockidbigint(10) 是0pageidbigint(10) 是0pagetypevarchar(20)是positionvarchar(10)是weightsmallint(3)是0visibletinyint(1)是0configdatatext是NULL表的结构 tfmdl_block_pinned字段类型Null默认idbigint(10) 是NULLblockidbigint(10

26、) 是0pagetypevarchar(20)是positionvarchar(10)是weightsmallint(3)是0visibletinyint(1)是0configdatatext是NULL表的结构 tfmdl_block_rss_client字段类型Null默认idbigint(10) 是NULLuseridbigint(10) 是0titletext是NULLpreferredtitlevarchar(64)是descriptiontext是NULLsharedtinyint(2) 是0urlvarchar(255)是表的结构 tfmdl_block_search_docume

27、nts字段类型Null默认idbigint(10) 是NULLdocidvarchar(32)是doctypevarchar(32)是noneitemtypevarchar(32)是standardtitlevarchar(255)是urlvarchar(255)是docdatebigint(10) 是0updatedbigint(10) 是0courseidbigint(10) 是0groupidbigint(10) 是0表的结构 tfmdl_cache_filters字段类型Null默认idbigint(10) 是NULLfiltervarchar(32)是versionbigint(10

28、) 是0md5keyvarchar(32)是rawtexttext是NULLtimemodifiedbigint(10) 是0表的结构 tfmdl_cache_flags字段类型Null默认idbigint(10) 是NULLflagtypevarchar(255)是namevarchar(255)是timemodifiedbigint(10) 是0valuemediumtext是NULLexpirybigint(10) 是NULL表的结构 tfmdl_cache_text字段类型Null默认idbigint(10) 是NULLmd5keyvarchar(32)是formattedtextlo

29、ngtext是NULLtimemodifiedbigint(10) 是0表的结构 tfmdl_capabilities字段类型Null默认idbigint(10) 是NULLnamevarchar(255)是captypevarchar(50)是contextlevelbigint(10) 是0componentvarchar(100)是riskbitmaskbigint(10) 是0表的结构 tfmdl_chat字段类型Null默认idbigint(10) 是NULLcoursebigint(10) 是0namevarchar(255)是introtext是NULLkeepdaysbigin

30、t(11)是0studentlogssmallint(4)是0chattimebigint(10) 是0schedulesmallint(4)是0timemodifiedbigint(10) 是0表的结构 tfmdl_chat_messages字段类型Null默认idbigint(10) 是NULLchatidbigint(10)是0useridbigint(10)是0groupidbigint(10)是0systemtinyint(1) 是0messagetext是NULLtimestampbigint(10) 是0表的结构 tfmdl_chat_users字段类型Null默认idbigin

31、t(10) 是NULLchatidbigint(11)是0useridbigint(11)是0groupidbigint(11)是0versionvarchar(16)是ipvarchar(15)是firstpingbigint(10) 是0lastpingbigint(10) 是0lastmessagepingbigint(10) 是0sidvarchar(32)是coursebigint(10) 是0langvarchar(30)是表的结构 tfmdl_choice字段类型Null默认idbigint(10) 是NULLcoursebigint(10) 是0namevarchar(255)

32、是texttext是NULLformattinyint(2) 是0publishtinyint(2) 是0showresultstinyint(2) 是0displaysmallint(4) 是0allowupdatetinyint(2) 是0showunansweredtinyint(2) 是0limitanswerstinyint(2) 是0timeopenbigint(10) 是0timeclosebigint(10) 是0timemodifiedbigint(10) 是0表的结构 tfmdl_choice_answers字段类型Null默认idbigint(10) 是NULLchoic

33、eidbigint(10) 是0useridbigint(10) 是0optionidbigint(10) 是0timemodifiedbigint(10) 是0表的结构 tfmdl_choice_options字段类型Null默认idbigint(10) 是NULLchoiceidbigint(10) 是0texttext是NULLmaxanswersbigint(10) 是0timemodifiedbigint(10) 是0表的结构 tfmdl_config字段类型Null默认idbigint(10) 是NULLnamevarchar(255)是valuetext是NULL表的结构 tfm

34、dl_config_plugins字段类型Null默认idbigint(10) 是NULLpluginvarchar(100)是corenamevarchar(100)是valuetext是NULL表的结构 tfmdl_context字段类型Null默认idbigint(10) 是NULLcontextlevelbigint(10) 是0instanceidbigint(10) 是0pathvarchar(255)是NULLdepthtinyint(2) 是0表的结构 tfmdl_context_temp字段类型Null默认idbigint(10) 是NULLpathvarchar(255)是

35、depthtinyint(2) 是NULL表的结构 tfmdl_course字段类型Null默认idbigint(10) 是NULLcategorybigint(10) 是0sortorderbigint(10) 是0passwordvarchar(50)是fullnamevarchar(254)是shortnamevarchar(100)是idnumbervarchar(100)是summarytext是NULLformatvarchar(10)是topicsshowgradestinyint(2) 是1modinfolongtext是NULLnewsitemsmediumint(5) 是1

36、teachervarchar(100)是Teacherteachersvarchar(100)是Teachersstudentvarchar(100)是Studentstudentsvarchar(100)是Studentsguesttinyint(2) 是0startdatebigint(10) 是0enrolperiodbigint(10) 是0numsectionsmediumint(5) 是1markerbigint(10) 是0maxbytesbigint(10) 是0showreportssmallint(4) 是0visibletinyint(1) 是1hiddensection

37、stinyint(2) 是0groupmodesmallint(4) 是0groupmodeforcesmallint(4) 是0defaultgroupingidbigint(10) 是0langvarchar(30)是themevarchar(50)是costvarchar(10)是currencyvarchar(3)是USDtimecreatedbigint(10) 是0timemodifiedbigint(10) 是0metacoursetinyint(1) 是0requestedtinyint(1) 是0restrictmodulestinyint(1) 是0expirynotify

38、tinyint(1) 是0expirythresholdbigint(10) 是0notifystudentstinyint(1) 是0enrollabletinyint(1) 是1enrolstartdatebigint(10) 是0enrolenddatebigint(10) 是0enrolvarchar(20)是defaultrolebigint(10) 是0表的结构 tfmdl_course_allowed_modules字段类型Null默认idbigint(10) 是NULLcoursebigint(10) 是0modulebigint(10) 是0表的结构 tfmdl_course

39、_categories字段类型Null默认idbigint(10) 是NULLnamevarchar(255)是descriptiontext是NULLparentbigint(10) 是0sortorderbigint(10) 是0coursecountbigint(10) 是0visibletinyint(1)是1timemodifiedbigint(10) 是0depthbigint(10) 是0pathvarchar(255)是themevarchar(50)是NULL表的结构 tfmdl_course_display字段类型Null默认idbigint(10) 是NULLcourse

40、bigint(10) 是0useridbigint(10) 是0displaybigint(10)是0表的结构 tfmdl_course_meta字段类型Null默认idbigint(10) 是NULLparent_coursebigint(10) 是0child_coursebigint(10) 是0表的结构 tfmdl_course_modules字段类型Null默认idbigint(10) 是NULLcoursebigint(10) 是0modulebigint(10) 是0instancebigint(10) 是0sectionbigint(10) 是0idnumbervarchar(

41、100)是NULLaddedbigint(10) 是0scoresmallint(4)是0indentmediumint(5) 是0visibletinyint(1)是1visibleoldtinyint(1)是1groupmodesmallint(4)是0groupingidbigint(10) 是0groupmembersonlysmallint(4) 是0表的结构 tfmdl_course_request字段类型Null默认idbigint(10) 是NULLfullnamevarchar(254)是shortnamevarchar(15)是summarytext是NULLreasont

42、ext是NULLrequesterbigint(10) 是0passwordvarchar(50)是表的结构 tfmdl_course_sections字段类型Null默认idbigint(10) 是NULLcoursebigint(10) 是0sectionbigint(10) 是0summarytext是NULLsequencetext是NULLvisibletinyint(1)是1表的结构 tfmdl_data字段类型Null默认idbigint(10) 是NULLcoursebigint(10) 是0namevarchar(255)是introtext是NULLcommentssmal

43、lint(4) 是0timeavailablefrombigint(10) 是0timeavailabletobigint(10) 是0timeviewfrombigint(10) 是0timeviewtobigint(10) 是0requiredentriesint(8) 是0requiredentriestoviewint(8) 是0maxentriesint(8) 是0rssarticlessmallint(4) 是0singletemplatetext是NULLlisttemplatetext是NULLlisttemplateheadertext是NULLlisttemplatefoo

44、tertext是NULLaddtemplatetext是NULLrsstemplatetext是NULLrsstitletemplatetext是NULLcsstemplatetext是NULLjstemplatetext是NULLasearchtemplatetext是NULLapprovalsmallint(4) 是0scalebigint(10)是0assessedbigint(10) 是0defaultsortbigint(10) 是0defaultsortdirsmallint(4) 是0editanysmallint(4) 是0notificationbigint(10)是NULL

45、表的结构 tfmdl_data_comments字段类型Null默认idbigint(10) 是NULLuseridbigint(10) 是0recordidbigint(10) 是0contenttext是NULLformattinyint(2) 是0createdbigint(10) 是0modifiedbigint(10) 是0表的结构 tfmdl_data_content字段类型Null默认idbigint(10) 是NULLfieldidbigint(10) 是0recordidbigint(10) 是0contentlongtext是NULLcontent1longtext是NUL

46、Lcontent2longtext是NULLcontent3longtext是NULLcontent4longtext是NULL表的结构 tfmdl_data_fields字段类型Null默认idbigint(10) 是NULLdataidbigint(10) 是0typevarchar(255)是namevarchar(255)是descriptiontext是NULLparam1text是NULLparam2text是NULLparam3text是NULLparam4text是NULLparam5text是NULLparam6text是NULLparam7text是NULLparam8text是NULLparam9text是NULLparam10text是NULL表的结构 tfmdl_data_ratings字段类型Null默认idbigint(10)

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

最新文档

评论

0/150

提交评论