ILIAS Tabellenstruktur

Database Model of ILIAS 3.8
Note: This document describes an excerpt of the ILIAS database tables.
This document is (most-likely) inaccurate.
Use the information contained in this document with caution!
Werner Randelshofer, Lucerne University of Applied Sciences and Arts, April 2008
Repository .......................................................................................................................... 2
RBAC ................................................................................................................................. 7
User Objects and Personal Desktop ................................................................................. 12
Forum Objects .................................................................................................................. 14
Learning Objects .............................................................................................................. 15
Course Objects ................................................................................................................. 16
Mail System...................................................................................................................... 17
Test ................................................................................................................................... 20
Access Statistics ............................................................................................................... 26
Survey........................................................................................................................... 23
MediaWiki .................................................................................................................... 26
Other tables .................................................................................................................. 26
Copyright 2008 © Lucerne University of Applied Sciences and Arts.
This document is licensed under the Creative Commons Attribution-ShareAlike 3.0 license.
1
2
3
4
5
6
7
8
9
10
11
12
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 1 von 28
1
Repository
tree
tree
child
parent
lft
rgt
depth
1
object_reference
ref_id
1
mc
obj_id
deleted
object_data
obj_id
type
title
1 description
owner
create_date
last_update
import_id
type
exc_data
file_data
grp_data
ilinc_data
wiki_data
usr_data
rbac_fa
role_data
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 2 von 28
1.1 Table "tree"
Table tree holds the structure of the ILIAS repository tree.
mysql> explain tree;
+--------+----------------------+------+-----+---------+-------+
| Field | Type
| Null | Key | Default | Extra |
+--------+----------------------+------+-----+---------+-------+
| tree
| int(10)
|
| MUL | 0
|
|
| child | int(10) unsigned
|
| MUL | 0
|
|
| parent | int(10) unsigned
| YES | MUL | NULL
|
|
| lft
| int(10) unsigned
|
|
| 0
|
|
| rgt
| int(10) unsigned
|
|
| 0
|
|
| depth | smallint(5) unsigned |
|
| 0
|
|
+--------+----------------------+------+-----+---------+-------+
6 rows in set (0.00 sec)
The tree structure is represented using a "Nested Sets Tree With Gaps" and, for redundancy,
using an "Adjacency Map Tree".
The fields lft, rgt and depth hold the data elements needed for the Nested Sets Tree.
The field parent holds the data element needed for the Adjacency Map Tree.
The child field holds the reference id of an object in the repository. Table object_reference
can be used to find the associated object in table object_data.
1.1.1 Additional documentation about table tree
Nested Sets Tree
 http://www.developersdex.com/gurus/articles/112.asp
 http://www.celko.com/index.html
 http://ffm.junetz.de/members/reeg/dev/DSP/node88.html
1.2 Table object_reference
Table object_reference links between table tree and table object_data.
The field ref_id is a foreign key to field child in table tree.
The field obj_id is a foreign key to field obj_id in table object_data.
mysql> explain object_reference;
+---------+----------+------+-----+---------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+---------+----------+------+-----+---------------------+----------------+
| ref_id | int(11) |
| PRI | NULL
| auto_increment |
| obj_id | int(11) |
| MUL | 0
|
|
| deleted | datetime |
| MUL | 0000-00-00 00:00:00 |
|
+---------+----------+------+-----+---------------------+----------------+
3 rows in set (0.00 sec)
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 3 von 28
1.3 Table object_data
Table object_data holds the base fields of all objects that ILIAS can work with.
This is not limited to objects in the repository. For example, table object_data also holds the
base fields for user objects.
Table object_data table is the superclass table of subclass tables in ILIAS with the suffix
_data. The prefix for the subclass table is stored in field type of table object_data.
For example, the base data for subclass table usr_data that is stored in table object_data has
the type 'usr'.
Warning: There are many tables with the suffix _data in the ILIAS database that are not
subclass tables of table object_data!
mysql> explain object_data;
+-------------+-----------+------+-----+---------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+-------------+-----------+------+-----+---------------------+----------------+
| obj_id
| int(11)
|
| PRI | NULL
| auto_increment |
| type
| char(4)
|
| MUL | none
|
|
| title
| char(70) |
| MUL |
|
|
| description | char(128) | YES |
| NULL
|
|
| owner
| int(11)
|
|
| 0
|
|
| create_date | datetime |
|
| 0000-00-00 00:00:00 |
|
| last_update | datetime |
|
| 0000-00-00 00:00:00 |
|
| import_id
| char(50) |
|
|
|
|
+-------------+-----------+------+-----+---------------------+----------------+
8 rows in set (0.00 sec)
mysql>
The field owner is a foreign key for field usr_id in table usr_data.
1.4 Sample Queries
1.4.1 Get the tree child of the specified object
mysql> select ref_id from object_reference where obj_id = 180039;
+--------+
| ref_id |
+--------+
| 157426 |
+--------+
1 row in set (0.00 sec)
mysql>
1.4.2 List the path to the specified tree child
Lists the path to a node in the tree by a given tree
child:
mysql> select t2.*, d.type, d.title from tree as t1 join tree as t2 on t1.lft
between t2.lft and t2.rgt and t1.tree = t2.tree join object_reference as r on
r.ref_id = t2.child join object_data as d on d.obj_id = r.obj_id and t1.child=157426
order by lft;
+------+--------+--------+--------+---------+-------+------+------------------+
| tree | child | parent | lft
| rgt
| depth | type | title
|
+------+--------+--------+--------+---------+-------+------+------------------+
|
1 |
1 |
0 |
1 | 2869630 |
1 | root | ILIAS
|
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 4 von 28
|
1 |
17 |
1 |
444 | 176647 |
2 | cat | FHZ
|
|
1 | 166714 |
17 | 63045 | 176546 |
3 | cat |
Weiterbildung |
|
1 |
32 | 166714 | 77106 | 176445 |
4 | cat | Neue Lernmedien |
|
1 | 157426 |
32 | 165913 | 167506 |
5 | crs | FHZ.ILIAS1.0612 |
+------+--------+--------+--------+---------+-------+------+------------------+
5 rows in set (0.39 sec)
mysql>
1.4.3 List all children of the specified tree child
Lists the path to a node in the tree by a given reference id:
mysql> select t.*, d.type, left(d.title,16) from tree as t join object_reference as
r on r.ref_id=t.child join object_data as d on d.obj_id=r.obj_id where
t.parent=157426 order by lft;
+------+--------+--------+--------+--------+-------+------+------------------+
| tree | child | parent | lft
| rgt
| depth | type | left(d.title,16) |
+------+--------+--------+--------+--------+-------+------+------------------+
|
1 | 157427 | 157426 | 165914 | 165915 |
6 | rolf | 180039
|
|
1 | 157430 | 157426 | 165916 | 166123 |
6 | fold | Arbeitsgruppen
|
|
1 | 157461 | 157426 | 166124 | 166551 |
6 | fold | Unterlagen
|
|
1 | 157475 | 157426 | 166552 | 166675 |
6 | fold | Beispiele
|
|
1 | 157488 | 157426 | 166676 | 166779 |
6 | frm | Forum 'FHZ.ILIAS |
|
1 | 157490 | 157426 | 166780 | 166883 |
6 | chat | Chat 'FHZ.ILIAS1 |
|
1 | 157492 | 157426 | 166884 | 166885 |
6 | svy | Evaluation Kurs |
|
1 | 157496 | 157426 | 166886 | 167197 |
6 | fold | Dateiablage
|
|
1 | 157486 | 157426 | 167198 | 167301 |
6 | grp | FHZ.ILIAS1.1206. |
|
1 | 157601 | 157426 | 167302 | 167405 |
6 | grp | FHZ.ILIAS1.1206. |
+------+--------+--------+--------+--------+-------+------+------------------+
10 rows in set (0.00 sec)
mysql>
1.4.4 List the subtree starting at the specified tree child
Lists the path to a node in the tree by a given reference id:
mysql> select t2.*, d.type, left(d.title,16) from tree as t1 join tree as t2 on
t2.lft between t1.lft and t1.rgt and t1.tree = t2.tree join object_reference as r on
r.ref_id = t2.child join object_data as d on d.obj_id = r.obj_id where
t1.child=157426 order by lft;
+------+--------+--------+--------+--------+-------+------+------------------+
| tree | child | parent | lft
| rgt
| depth | type | left(d.title,16) |
+------+--------+--------+--------+--------+-------+------+------------------+
|
1 | 157426 |
32 | 165913 | 167506 |
5 | crs | FHZ.ILIAS1.0612 |
|
1 | 157427 | 157426 | 165914 | 165915 |
6 | rolf | 180039
|
|
1 | 157430 | 157426 | 165916 | 166123 |
6 | fold | Arbeitsgruppen
|
|
1 | 157484 | 157430 | 165917 | 165918 |
7 | rolf | 180046
|
|
1 | 157711 | 157430 | 165919 | 166022 |
7 | grp | Testgruppe MSO 2 |
|
1 | 157712 | 157711 | 165920 | 165921 |
8 | rolf | 180344
|
|
1 | 157461 | 157426 | 166124 | 166551 |
6 | fold | Unterlagen
|
|
1 | 157462 | 157461 | 166125 | 166230 |
7 | fold | Unterlagen I Med |
|
1 | 157463 | 157462 | 166126 | 166127 |
8 | file | 02.02 ILIAS E-Le |
|
1 | 157605 | 157462 | 166128 | 166129 |
8 | file | 02.01 ILIAS Modu |
|
1 | 157464 | 157461 | 166231 | 166346 |
7 | fold | Hands On I Medie |
|
1 | 157467 | 157464 | 166232 | 166233 |
8 | file | 03.03 ILIAS Hand |
|
1 | 157468 | 157464 | 166234 | 166235 |
8 | file | 03.04 ILIAS Hand |
|
1 | 157469 | 157464 | 166236 | 166237 |
8 | file | 03.05 ILIAS Hand |
|
1 | 157471 | 157464 | 166238 | 166239 |
8 | file | 03.07 ILIAS Hand |
|
1 | 157472 | 157464 | 166240 | 166241 |
8 | file | 03.08 ILIAS Hand |
|
1 | 157520 | 157464 | 166242 | 166243 |
8 | file | 03.06 ILIAS Hand |
|
1 | 157521 | 157464 | 166244 | 166245 |
8 | file | 03.02 ILIAS Hand |
|
1 | 157473 | 157461 | 166347 | 166450 |
7 | fold | Hands On II Lern |
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 5 von 28
|
1 | 157474 | 157473 | 166348 | 166349 |
8 | file | 05.01 ILIAS Hand |
|
1 | 157475 | 157426 | 166552 | 166675 |
6 | fold | Beispiele
|
|
1 | 157476 | 157475 | 166553 | 166554 |
7 | file | Beispiel für ein |
|
1 | 157477 | 157475 | 166555 | 166556 |
7 | file | Beispiel für ein |
|
1 | 157508 | 157475 | 166557 | 166558 |
7 | tst | Test Architektur |
|
1 | 157509 | 157475 | 166559 | 166560 |
7 | svy | Evaluation ILIAS |
|
1 | 157510 | 157475 | 166561 | 166562 |
7 | lm
| Architekturgesch |
|
1 | 157511 | 157475 | 166563 | 166564 |
7 | glo | Glossar E-Learni |
|
1 | 157512 | 157475 | 166565 | 166566 |
7 | sahs | Objektorientier |
|
1 | 157514 | 157475 | 166567 | 166568 |
7 | qpl | Fragenpool Archi |
|
1 | 157515 | 157475 | 166569 | 166570 |
7 | spl | Fragenpool Evalu |
|
1 | 154986 | 157475 | 166571 | 166572 |
7 | exc | Übung Tiki
|
|
1 | 179333 | 157475 | 166573 | 166574 |
7 | svy | Evaluation ILIAS |
|
1 | 157488 | 157426 | 166676 | 166779 |
6 | frm | Forum 'FHZ.ILIAS |
|
1 | 157489 | 157488 | 166677 | 166678 |
7 | rolf | 180117
|
|
1 | 157490 | 157426 | 166780 | 166883 |
6 | chat | Chat 'FHZ.ILIAS1 |
|
1 | 157491 | 157490 | 166781 | 166782 |
7 | rolf | 180120
|
|
1 | 157492 | 157426 | 166884 | 166885 |
6 | svy | Evaluation Kurs |
|
1 | 157496 | 157426 | 166886 | 167197 |
6 | fold | Dateiablage
|
|
1 | 157497 | 157496 | 166887 | 166990 |
7 | fold | Dateiaustausch ( |
|
1 | 157500 | 157497 | 166888 | 166889 |
8 | rolf | 180128
|
|
1 | 157498 | 157496 | 166991 | 167094 |
7 | fold | Briefkasten 'Arb |
|
1 | 157501 | 157498 | 166992 | 166993 |
8 | rolf | 180129
|
|
1 | 157499 | 157496 | 167095 | 167096 |
7 | rolf | 180127
|
|
1 | 157486 | 157426 | 167198 | 167301 |
6 | grp | FHZ.ILIAS1.1206. |
|
1 | 157487 | 157486 | 167199 | 167200 |
7 | rolf | 180113
|
|
1 | 157601 | 157426 | 167302 | 167405 |
6 | grp | FHZ.ILIAS1.1206. |
|
1 | 157602 | 157601 | 167303 | 167304 |
7 | rolf | 180227
|
+------+--------+--------+--------+--------+-------+------+------------------+
47 rows in set (0.40 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 6 von 28
2
RBAC
tree
object_reference
object_data
type='rolf'
rbac_operations
ops_id
operation
description
class
op_order
rbac_pa
rol_id
ref_id
ops_id
rbac_ta
typ_id
ops_id
rbac_templates
rol_id
type
ops_id
parent
role_data
role_id
allow_register
assign_users
auth_mode
rbac_fa
rol_id
parent
assign
protected
rbac_ua
usr_id
rol_id
2.1 Table "rbac_fa"
Table rbac_fa assigns a role to a role folder. This is a subclass table to table object_data.
The value of the type field in the associated row in table object_data is 'role'.
mysql> explain rbac_fa;
+-----------+---------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+-----------+---------------+------+-----+---------+-------+
| rol_id
| int(11)
|
| PRI | 0
|
|
| parent
| int(11)
|
| PRI | 0
|
|
| assign
| enum('y','n') | YES |
| NULL
|
|
| protected | enum('y','n') | YES |
| n
|
|
+-----------+---------------+------+-----+---------+-------+
4 rows in set (0.00 sec)
The field rol_id is a foreign key to field obj_id in table object_data.
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 7 von 28
The field parent is a foreign key to field child in table tree. The child belongs to a role
folder object.
Note: The title of the role folder usually contains the object id, of its parent object. There are
some exceptions though. Notably the role folder in the administration view has the title
"Rollen".
2.2 Table "rbac_ua"
Table rbac_ua associates users with roles, that is, it holds the members of a role.
mysql> explain rbac_ua;
+--------+---------+------+-----+---------+-------+
| Field | Type
| Null | Key | Default | Extra |
+--------+---------+------+-----+---------+-------+
| usr_id | int(11) |
| PRI | 0
|
|
| rol_id | int(11) |
| PRI | 0
|
|
+--------+---------+------+-----+---------+-------+
2 rows in set (0.00 sec)
The field usr_id is a foreign key to field obj_id in table object_data and to field usr_id in
table usr_data.
The field rol_id is a foreign key to field obj_id in table object_data.
2.3 Table "rbac_pa"
Table rbac_pa associates roles, operations and tree nodes.
mysql> explain rbac_pa;
+--------+---------+------+-----+---------+-------+
| Field | Type
| Null | Key | Default | Extra |
+--------+---------+------+-----+---------+-------+
| rol_id | int(11) |
| PRI | 0
|
|
| ops_id | text
|
|
|
|
|
| ref_id | int(11) |
| PRI | 0
|
|
+--------+---------+------+-----+---------+-------+
3 rows in set (0.00 sec)
mysql>



The field rol_id is a foreign key to field object_id in table object_data.
The field ops_id
The field ref_id is a foreign key to field child in table tree.
2.3.1 Table "rbac_operations"
Table rbac_operations defines the operations that the access control system supports.
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 8 von 28
mysql> explain rbac_operations;
+-------------+---------------------------+------+-----+---------+----------------+
| Field
| Type
| Null | Key | Default | Extra
|
+-------------+---------------------------+------+-----+---------+----------------+
| ops_id
| int(11)
|
| PRI | NULL
| auto_increment |
| operation
| char(32)
|
| UNI |
|
|
| description | char(255)
| YES |
| NULL
|
|
| class
| enum('create','general',
'object','rbac',
'admin','notused')
|
|
| notused |
|
| op_order
| smallint(5) unsigned
| YES |
| NULL
|
|
+-------------+---------------------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
mysql>
2.3.2 Table rbac_ta
Table rbac_ta associates each object type with rbac_operations.
mysql> explain rbac_ta;
+--------+-------------+------+-----+---------+-------+
| Field | Type
| Null | Key | Default | Extra |
+--------+-------------+------+-----+---------+-------+
| typ_id | int(11)
|
| PRI | 0
|
|
| ops_id | smallint(6) |
| PRI | 0
|
|
+--------+-------------+------+-----+---------+-------+
2 rows in set (0.00 sec)
mysql>

ops_id is a foreign key to rbac_operations;
2.4 Sample Queries
2.4.1 List all members of the specified role.
select role.title,login,firstname,lastname from rbac_ua as ua join object_data as
role on ua.rol_id = role.obj_id join usr_data as usr on ua.usr_id = usr.usr_id where
rol_id = role id;
2.4.2 List all local roles defined for the specified object
mysql> select fa.rol_id,dr.title as 'role_title',dp.obj_id,dp.type,dp.title as
'obj_title' from rbac_fa as fa join tree as t on t.child = fa.parent join
object_reference as r on r.ref_id=t.parent join object_data as dp on dp.obj_id =
r.obj_id join object_data as dr on dr.obj_id = fa.rol_id where fa.assign='y' and
dp.obj_id=180039;
+--------+----------------------+--------+------+-----------------+
| rol_id | rol_title
| obj_id | type | obj_title
|
+--------+----------------------+--------+------+-----------------+
| 180041 | il_crs_admin_157426 | 180039 | crs | FHZ.ILIAS1.0612 |
| 180042 | il_crs_tutor_157426 | 180039 | crs | FHZ.ILIAS1.0612 |
| 180043 | il_crs_member_157426 | 180039 | crs | FHZ.ILIAS1.0612 |
+--------+----------------------+--------+------+-----------------+
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 9 von 28
3 rows in set (0.00 sec)
mysql>
2.4.3 List all local roles and all roles with a local policy for the specified
object
mysql> select fa.rol_id,fa.assign,dr.title as 'rol_title',dp.obj_id,dp.type,dp.title
as 'obj_title' from rbac_fa as fa join tree as t on t.child = fa.parent join
object_reference as r on r.ref_id=t.parent join object_data as dp on dp.obj_id =
r.obj_id join object_data as dr on dr.obj_id = fa.rol_id where dp.obj_id=180039;
+--------+--------+----------------------+--------+------+-----------------+
| rol_id | assign | rol_title
| obj_id | type | obj_title
|
+--------+--------+----------------------+--------+------+-----------------+
| 180041 | y
| il_crs_admin_157426 | 180039 | crs | FHZ.ILIAS1.0612 |
| 180042 | y
| il_crs_tutor_157426 | 180039 | crs | FHZ.ILIAS1.0612 |
| 180043 | y
| il_crs_member_157426 | 180039 | crs | FHZ.ILIAS1.0612 |
|
5 | n
| Gast
| 180039 | crs | FHZ.ILIAS1.0612 |
|
14 | n
| Anonym
| 180039 | crs | FHZ.ILIAS1.0612 |
|
109 | n
| BenutzerIn
| 180039 | crs | FHZ.ILIAS1.0612 |
|
1525 | n
| Alumni
| 180039 | crs | FHZ.ILIAS1.0612 |
+--------+--------+----------------------+--------+------+-----------------+
7 rows in set (0.00 sec)
2.4.4 List all local roles for a subtree of the repository starting at the
specified tree node
mysql> select fa.rol_id,dr.title as 'rol_title',dp.obj_id,dp.type,dp.title as
'obj_title' from tree as t1 join tree as t2 on t2.lft between t1.lft and t1.rgt and
t1.tree=t2.tree join object_reference as r on r.ref_id=t2.child join object_data as
dp on dp.obj_id=r.obj_id join tree as tr on tr.parent=t2.child join rbac_fa as fa on
fa.parent=tr.child join object_data as dr on dr.obj_id = fa.rol_id where
t1.child=157426 and fa.assign='y' order by t2.lft;
+--------+--------------------------+--------+------+--------------------------+
| rol_id | rol_title
| obj_id | type | obj_title
|
+--------+--------------------------+--------+------+--------------------------+
| 180043 | il_crs_member_157426
| 180039 | crs | FHZ.ILIAS1.0612
|
| 180042 | il_crs_tutor_157426
| 180039 | crs | FHZ.ILIAS1.0612
|
| 180041 | il_crs_admin_157426
| 180039 | crs | FHZ.ILIAS1.0612
|
| 180347 | il_grp_member_157711
| 180344 | grp | Testgruppe MSO 2.12.2006 |
| 180346 | il_grp_admin_157711
| 180344 | grp | Testgruppe MSO 2.12.2006 |
| 180119 | il_frm_moderator_157488 | 180117 | frm | Forum 'FHZ.ILIAS1.1206' |
| 180122 | il_chat_moderator_157490 | 180120 | chat | Chat 'FHZ.ILIAS1.1206'
|
| 180116 | il_grp_member_157486
| 180113 | grp | FHZ.ILIAS1.1206.LG2
|
| 180115 | il_grp_admin_157486
| 180113 | grp | FHZ.ILIAS1.1206.LG2
|
| 180230 | il_grp_member_157601
| 180227 | grp | FHZ.ILIAS1.1206.LG1
|
| 180229 | il_grp_admin_157601
| 180227 | grp | FHZ.ILIAS1.1206.LG1
|
+--------+--------------------------+--------+------+--------------------------+
11 rows in set (0.39 sec)
mysql>
2.4.5 List all operations supported by a specific object type
mysql> select dat.obj_id,dat.title,op.ops_id,op.operation from rbac_ta as ta join
object_data as dat on ta.typ_id=dat.obj_id join rbac_operations as op on op.ops_id =
ta.ops_id where dat.title='wiki';
+--------+-------+--------+-----------------+
| obj_id | title | ops_id | operation
|
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 10 von 28
+--------+-------+--------+-----------------+
| 144488 | wiki |
1 | edit_permission |
| 144488 | wiki |
2 | visible
|
| 144488 | wiki |
3 | read
|
| 144488 | wiki |
4 | write
|
| 144488 | wiki |
6 | delete
|
| 144488 | wiki |
7 | join
|
| 144488 | wiki |
8 | leave
|
+--------+-------+--------+-----------------+
7 rows in set (0.00 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 11 von 28
3
User Objects and Personal Desktop
object_data
obj_id
type
title
description
owner
create_date
last_update
import_id
type='usr'
bookmark_data
usr_defined_data
usr_new_account_mail
usr_pref
usr_pwassist
usr_search
usr_session
desktop_item
user_id
item_id
type
parameters
usr_data
usr_id
login
passwd
firstname
lastname
title
gender
email
institution
street
city
zipcode
country
phone_office
last_login
last_update
create_date
hobby
department
phone_home
phone_mobile
fax
i2passwd
time_limit_owner,
time_limit_unlimited,
time_limit_from,
time_limit_until,
time_limit_message
referral_comment
matriculation
active
approve_date
agree_date
ilinc_id, ilinc_login,
ilinc_passwd
client_ip
auth_mode
profile_incomplete
ext_account
Alle Einträge auf dem Persönlichen Schreibtisch eines Benutzers anzeigen:
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 12 von 28
mysql> select pd.*,dat.obj_id,dat.type,dat.title from desktop_item as pd join
object_reference as ref on ref.ref_id = pd.item_id join object_data as dat on
ref.obj_id = dat.obj_id where user_id = 112;
+---------+---------+------+------------+--------+------+----------------------------------------+
| user_id | item_id | type | parameters | obj_id | type | title
|
+---------+---------+------+------------+--------+------+----------------------------------------+
|
112 |
57051 | grp |
| 69871 | grp | eMACC
|
|
112 | 136198 | grp |
| 157745 | grp | SCORM FHZ Templates
|
|
112 |
39296 | grp |
| 49999 | grp | Systemadministration
|
|
112 |
6766 | frm |
|
9932 | frm | ILIAS Hilfeforum
|
|
112 | 143956 | grp |
| 166053 | grp | Skyguide
|
|
112 | 131514 | wiki |
| 152589 | wiki | Wiki A
|
|
112 |
6773 | frm |
|
9935 | frm | ILIAS Newsforum
|
|
112 |
48123 | file |
| 59606 | file | ILIAS Kurzreferenz Studierende 3.1.pdf |
|
112 |
34711 | grp |
| 44900 | grp | M^3 online
|
+---------+---------+------+------------+--------+------+----------------------------------------+
9 rows in set (0.00 sec)
mysql>
3.1.1 Table usr_pref
Table usr_pref holds user-specific preferences.
mysql> explain usr_pref;
+---------+------------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+---------+------------------+------+-----+---------+-------+
| usr_id | int(10) unsigned |
| PRI | 0
|
|
| keyword | char(40)
|
| PRI |
|
|
| value
| char(40)
| YES |
| NULL
|
|
+---------+------------------+------+-----+---------+-------+
3 rows in set (0.02 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 13 von 28
4
Forum Objects
frm_data
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 14 von 28
5
Learning Objects
lm_data
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 15 von 28
6
Course Objects
crs_archives
crs_settings
crs_file
crs_start
crs_groupings
crs_subscribers
crs_items
crs_timings_planed
crs_lm_history
crs_timings_usr_accept
crs_members
crs_waiting_list
crs_objective_lm
crs_objective_qst
crs_objective_results
crs_objective_status_pretest
crs_objective_tst
crs_objectives
6.1.1 Table crs_members
mysql> explain crs_members;
+--------+------------+------+-----+---------+-------+
| Field | Type
| Null | Key | Default | Extra |
+--------+------------+------+-----+---------+-------+
| obj_id | int(11)
|
| PRI | 0
|
|
| usr_id | int(11)
|
| PRI | 0
|
|
| status | tinyint(2) |
|
| 0
|
|
| role
| tinyint(2) |
|
| 0
|
|
| passed | tinyint(1) | YES |
| NULL
|
|
+--------+------------+------+-----+---------+-------+
5 rows in set (0.00 sec)
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 16 von 28
7
Mail System
mail_obj_data
obj_id
user_id
title
type
mail
mail_id
user_id
folder_id
sender_id
attachments
send_time
rcp_to
rcp_cc
rcp_bcc
m_status
m_type
m_email
m_subject
m_message
import_name
mail_tree
tree
child
parent
lft
rgt
depth
usr_data
mail_saved
user_id
attachments
rcp_to
rcp_cc
rcp_bcc
m_type
m_email
m_subject
m_message
mail_attachment
mail_id
path
mail_options
user_id
linebreak
signature
incoming_type
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 17 von 28
7.1.1 Table mail
Holds mails.
mysql> explain mail;
+-------------+--------------+------+-----+---------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+-------------+--------------+------+-----+---------------------+----------------+
| mail_id
| int(11)
|
| PRI | NULL
| auto_increment |
| user_id
| int(11)
|
| MUL | 0
|
|
| folder_id
| int(11)
|
| MUL | 0
|
|
| sender_id
| int(11)
| YES |
| NULL
|
|
| attachments | varchar(255) | YES |
| NULL
|
|
| send_time
| datetime
|
|
| 0000-00-00 00:00:00 |
|
| rcp_to
| varchar(255) | YES |
| NULL
|
|
| rcp_cc
| varchar(255) | YES |
| NULL
|
|
| rcp_bcc
| varchar(255) | YES |
| NULL
|
|
| m_status
| varchar(16) | YES | MUL | NULL
|
|
| m_type
| varchar(255) | YES |
| NULL
|
|
| m_email
| tinyint(1)
| YES |
| NULL
|
|
| m_subject
| varchar(255) | YES |
| NULL
|
|
| m_message
| text
| YES |
| NULL
|
|
| import_name | text
| YES |
| NULL
|
|
+-------------+--------------+------+-----+---------------------+----------------+
15 rows in set (0.00 sec)
mysql>


Field user_id is a foreign key to field usr_id in table usr_data.
Field folder_id is a foreign key to field obj_id in table mail_obj_data.
7.1.2 Table mail_obj_data
Contains a row for each mail folder of a user.
mysql> explain mail_obj_data;
+---------+----------+------+-----+---------+----------------+
| Field
| Type
| Null | Key | Default | Extra
|
+---------+----------+------+-----+---------+----------------+
| obj_id | int(11) |
| PRI | NULL
| auto_increment |
| user_id | int(11) |
| PRI | 0
|
|
| title
| char(70) |
|
|
|
|
| type
| char(16) |
|
|
|
|
+---------+----------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
mysql>
7.1.3 Table mail_tree
Holds the structure of the mail folders of a user
mysql> explain mail_tree;
+--------+----------------------+------+-----+---------+-------+
| Field | Type
| Null | Key | Default | Extra |
+--------+----------------------+------+-----+---------+-------+
| tree
| int(11)
|
| MUL | 0
|
|
| child | int(11) unsigned
|
| MUL | 0
|
|
| parent | int(11) unsigned
| YES | MUL | NULL
|
|
| lft
| int(11) unsigned
|
|
| 0
|
|
| rgt
| int(11) unsigned
|
|
| 0
|
|
| depth | smallint(5) unsigned |
|
| 0
|
|
+--------+----------------------+------+-----+---------+-------+
6 rows in set (0.00 sec)
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 18 von 28
mysql>


The field tree is a foreign key to field usr_id in table usr_data.
The field child is a foreign key to field obj_id in table mail_obj_data.
7.1.4 Table mail_saved
Purpose?
mysql> explain mail_saved;
+-------------+--------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| user_id
| int(11)
|
|
| 0
|
|
| attachments | varchar(255) | YES |
| NULL
|
|
| rcp_to
| varchar(255) | YES |
| NULL
|
|
| rcp_cc
| varchar(255) | YES |
| NULL
|
|
| rcp_bcc
| varchar(255) | YES |
| NULL
|
|
| m_type
| varchar(16) | YES |
| NULL
|
|
| m_email
| tinyint(1)
| YES |
| NULL
|
|
| m_subject
| varchar(255) | YES |
| NULL
|
|
| m_message
| text
| YES |
| NULL
|
|
+-------------+--------------+------+-----+---------+-------+
9 rows in set (0.00 sec)
mysql>
7.1.5 Table mail_options
Holds the mail preferences of a user.
mysql> explain mail_options;
+---------------+------------+------+-----+---------+-------+
| Field
| Type
| Null | Key | Default | Extra |
+---------------+------------+------+-----+---------+-------+
| user_id
| int(11)
|
| MUL | 0
|
|
| linebreak
| tinyint(4) |
|
| 0
|
|
| signature
| text
|
|
|
|
|
| incoming_type | tinyint(3) | YES |
| NULL
|
|
+---------------+------------+------+-----+---------+-------+
4 rows in set (0.00 sec)
mysql>
7.1.6 List the mailbox folders of a user account
mysql> select * from mail_obj_data where user_id=132;
+--------+---------+----------+--------+
| obj_id | user_id | title
| type
|
+--------+---------+----------+--------+
|
20 |
132 | a_root
| root
|
|
21 |
132 | b_inbox | inbox |
|
22 |
132 | c_trash | trash |
|
23 |
132 | d_drafts | drafts |
|
24 |
132 | e_sent
| sent
|
|
25 |
132 | z_local | local |
+--------+---------+----------+--------+
6 rows in set (0.00 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 19 von 28
8
Test
tst_active_qst_sol_settings
tst_eval_settings
tst_eval_users
tst_tests
tst_invited_user
tst_mark
tst_solutions
tst_test_question
usr_data
tst_test_random
tst_test_random_question
tst_test_type
tst_tests_seq
tst_test_result
test_result_id
active_fi
question_fi
points
pass
TIMESTAMP
tst_times
tst_active
active_id
user_fi
anonymous_id
test_fi
sequence
postponed
lastindex
tries
TIMESTAMP
submitted
submittimestamp
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 20 von 28
qpl_questionpool
qpl_question_type
qpl_questions_seq
qpl_question_cloze
qpl_answer_cloze
qpl_question_essay
qpl_question_imagemap
qpl_answer_imagemap
qpl_question_javaapplet
qpl_question_matching
qpl_question_multiplechoice
qpl_answer_matching
qpl_answer_multiplechoice
qpl_question_numeric
qpl_question_ordering
qpl_answer_ordering
qpl_question_singlechoice
qpl_answer_singlechoice
qpl_question_textsubset
qpl_answer_textsubset
qpl_numeric_range
qpl_suggested_solutions
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 21 von 28
8.1.1 Table tst_tests
Holds data about a test object.
mysql> explain tst_tests;
+-------------------------+---------------------+------+-----+-------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+-------------------------+---------------------+------+-----+-------------------+----------------+
| test_id
| int(10) unsigned
|
| PRI | NULL
| auto_increment |
| obj_fi
| int(11)
|
| MUL | 0
|
|
| author
| varchar(50)
|
|
|
|
|
| test_type_fi
| int(10) unsigned
|
| MUL | 0
|
|
| introduction
| text
| YES | MUL | NULL
|
|
| sequence_settings
| tinyint(3) unsigned |
|
| 0
|
|
| score_reporting
| tinyint(3) unsigned |
|
| 0
|
|
| instant_verification
| enum('0','1')
|
|
| 0
|
|
| nr_of_tries
| tinyint(3) unsigned |
|
| 0
|
|
| hide_previous_results
| enum('0','1')
|
|
| 0
|
|
| hide_title_points
| enum('0','1')
|
|
| 0
|
|
| processing_time
| time
| YES |
| NULL
|
|
| enable_processing_time | enum('0','1')
|
|
| 0
|
|
| reporting_date
| varchar(14)
| YES |
| NULL
|
|
| starting_time
| varchar(14)
| YES |
| NULL
|
|
| ending_time
| varchar(14)
| YES |
| NULL
|
|
| shuffle_questions
| enum('0','1')
|
|
| 0
|
|
| ects_output
| enum('0','1')
|
|
| 0
|
|
| ects_fx
| float
| YES |
| NULL
|
|
| complete
| enum('0','1')
|
|
| 1
|
|
| created
| varchar(14)
| YES |
| NULL
|
|
| TIMESTAMP
| timestamp
| YES |
| CURRENT_TIMESTAMP |
|
| ects_a
| double
|
|
| 90
|
|
| ects_b
| double
|
|
| 65
|
|
| ects_c
| double
|
|
| 35
|
|
| ects_d
| double
|
|
| 10
|
|
| ects_e
| double
|
|
| 0
|
|
| random_test
| enum('0','1')
|
|
| 0
|
|
| random_question_count
| int(11)
| YES |
| NULL
|
|
| count_system
| enum('0','1')
|
|
| 0
|
|
| mc_scoring
| enum('0','1')
|
|
| 0
|
|
| score_cutting
| enum('0','1')
|
|
| 0
|
|
| pass_scoring
| enum('0','1')
|
|
| 0
|
|
| password
| varchar(20)
| YES |
| NULL
|
|
| allowedUsers
| int(11)
| YES |
| NULL
|
|
| allowedUsersTimeGap
| int(11)
| YES |
| NULL
|
|
| show_solution_details
| enum('0','1')
|
|
| 1
|
|
| show_solution_printview | enum('0','1')
|
|
| 0
|
|
| show_summary
| enum('0','1')
|
|
| 0
|
|
| show_question_titles
| enum('0','1')
|
|
| 1
|
|
+-------------------------+---------------------+------+-----+-------------------+----------------+
40 rows in set (0.00 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 22 von 28
9
Survey
survey_anonymous
survey_survey
survey_answer
survey_survey_question
survey_category
survey_constraint
survey_finished
survey_invited_group
survey_questionblock
survey_questionblock_question
survey_question_constraint
survey_invited_user
survey_material
survey_phrase
survey_relation
survey_phrase_category
survey_variable
survey_question
survey_questionpool
survey_questiontype
survey_question_material
survey_question_metric
survey_question_nominal
survey_question_obligatory
survey_question_ordinal
survey_question_text
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 23 von 28
9.1.1 Table survey_anonymous
???
mysql> explain survey_anonymous;
+--------------+-------------+------+-----+-------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+--------------+-------------+------+-----+-------------------+----------------+
| anonymous_id | int(11)
|
| PRI | NULL
| auto_increment |
| survey_key
| varchar(32) |
| MUL |
|
|
| survey_fi
| int(11)
|
| MUL | 0
|
|
| user_key
| varchar(40) | YES |
| NULL
|
|
| TIMESTAMP
| timestamp
| YES |
| CURRENT_TIMESTAMP |
|
+--------------+-------------+------+-----+-------------------+----------------+
5 rows in set (0.00 sec)
9.1.2 Table survey_survey
Holds data about a survey object.
mysql> explain survey_survey;
+----------------------+-------------------+------+-----+-------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+----------------------+-------------------+------+-----+-------------------+----------------+
| survey_id
| int(11)
|
| PRI | NULL
| auto_increment |
| obj_fi
| int(11)
|
| MUL | 0
|
|
| author
| varchar(50)
|
|
|
|
|
| introduction
| text
| YES | MUL | NULL
|
|
| outro
| text
| YES |
| NULL
|
|
| status
| enum('0','1')
|
|
| 1
|
|
| startdate
| date
| YES |
| NULL
|
|
| enddate
| date
| YES |
| NULL
|
|
| evaluation_access
| enum('0','1','2') |
|
| 0
|
|
| invitation
| enum('0','1')
|
|
| 0
|
|
| invitation_mode
| enum('0','1')
|
|
| 1
|
|
| complete
| enum('0','1')
|
|
| 0
|
|
| created
| varchar(14)
|
|
|
|
|
| anonymize
| enum('0','1','2') |
|
| 0
|
|
| show_question_titles | enum('0','1')
|
|
| 1
|
|
| TIMESTAMP
| timestamp
| YES |
| CURRENT_TIMESTAMP |
|
+----------------------+-------------------+------+-----+-------------------+----------------+
16 rows in set (0.00 sec)
mysql>
9.1.3 Table survey_survey_question
References the questions of a survey object.
mysql> explain survey_survey_question;
+--------------------+--------------+------+-----+-------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+--------------------+--------------+------+-----+-------------------+----------------+
| survey_question_id | int(11)
|
| PRI | NULL
| auto_increment |
| survey_fi
| int(11)
|
| MUL | 0
|
|
| question_fi
| int(11)
|
| MUL | 0
|
|
| sequence
| int(11)
|
|
| 0
|
|
| heading
| varchar(255) | YES |
| NULL
|
|
| TIMESTAMP
| timestamp
| YES |
| CURRENT_TIMESTAMP |
|
+--------------------+--------------+------+-----+-------------------+----------------+
6 rows in set (0.00 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 24 von 28
9.1.4 Table survey_question
mysql> explain survey_question;
+-----------------+------------------+------+-----+-------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+-----------------+------------------+------+-----+-------------------+----------------+
| question_id
| int(11)
|
| PRI | NULL
| auto_increment |
| questiontype_fi | int(11)
|
|
| 0
|
|
| obj_fi
| int(11) unsigned |
| MUL | 0
|
|
| owner_fi
| int(11)
|
| MUL | 0
|
|
| title
| varchar(100)
|
| MUL |
|
|
| description
| varchar(200)
|
|
|
|
|
| author
| varchar(100)
|
|
|
|
|
| questiontext
| text
|
|
|
|
|
| obligatory
| enum('0','1')
|
|
| 1
|
|
| complete
| enum('0','1')
|
|
| 0
|
|
| created
| varchar(14)
|
|
|
|
|
| original_id
| int(11)
| YES |
| NULL
|
|
| TIMESTAMP
| timestamp
| YES |
| CURRENT_TIMESTAMP |
|
+-----------------+------------------+------+-----+-------------------+----------------+
13 rows in set (0.00 sec)
mysql>
9.1.5 Table survey_questionpool
Holds data about a questionpool for survey object.
mysql> explain survey_questionpool;
+-----------------+---------------+------+-----+-------------------+----------------+
| Field
| Type
| Null | Key | Default
| Extra
|
+-----------------+---------------+------+-----+-------------------+----------------+
| id_questionpool | int(11)
|
| PRI | NULL
| auto_increment |
| obj_fi
| int(11)
|
| MUL | 0
|
|
| online
| enum('0','1') |
|
| 0
|
|
| TIMESTAMP
| timestamp
| YES |
| CURRENT_TIMESTAMP |
|
+-----------------+---------------+------+-----+-------------------+----------------+
4 rows in set (0.00 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 25 von 28
10 MediaWiki
wiki_nnnn_user_groups
ug_user
ug_group
11 Access Statistics
11.1 Table lo_access
For each access event, a new row is added to this table.
mysql> explain lo_access;
+-----------+--------------+------+-----+---------------------+-------+
| Field
| Type
| Null | Key | Default
| Extra |
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 26 von 28
+-----------+--------------+------+-----+---------------------+-------+
| timestamp | datetime
|
|
| 0000-00-00 00:00:00 |
|
| usr_id
| int(11)
|
|
| 0
|
|
| lm_id
| int(11)
|
|
| 0
|
|
| obj_id
| int(11)
|
|
| 0
|
|
| lm_title | varchar(200) |
|
|
|
|
+-----------+--------------+------+-----+---------------------+-------+
5 rows in set (0.00 sec)
mysql>
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 27 von 28
12
13 Other tables
lng_data
style_data
note_data
Lucerne University of Applied Sciences and Arts
Creative Commons By-SA 3.0
Werner Randelshofer
Seite 28 von 28