## Moodle lib/db ADODB XML Schema

(oci8po): ALTER SESSION SET NLS_DATE_FORMAT='YYYY-MM-DD' ``

(oci8po): select * from dept ``

    Array
    (
        [0] => Array
            (
                [0] => 10
                [DEPTNO] => 10
                [1] => ACCOUNTING
                [DNAME] => ACCOUNTING
                [2] => NEW YORK
                [LOC] => NEW YORK
            )

        [1] => Array
            (
                [0] => 20
                [DEPTNO] => 20
                [1] => RESEARCH
                [DNAME] => RESEARCH
                [2] => DALLAS
                [LOC] => DALLAS
            )

        [2] => Array
            (
                [0] => 30
                [DEPTNO] => 30
                [1] => SALES
                [DNAME] => SALES
                [2] => CHICAGO
                [LOC] => CHICAGO
            )

        [3] => Array
            (
                [0] => 40
                [DEPTNO] => 40
                [1] => OPERATIONS
                [DNAME] => OPERATIONS
                [2] => BOSTON
                [LOC] => BOSTON
            )

    )

Deptno | DName | Loc
--- | --- | ---
10 | ACCOUNTING | NEW YORK
20 | RESEARCH | DALLAS
30 | SALES | CHICAGO
40 | OPERATIONS | BOSTON

(oci8po): select value from sys.database_compatible_level ``

### schemaConfig.xml

(oci8po): drop table config ``

(oci8po): drop sequence SEQ_config ``

(oci8po): select value from sys.database_compatible_level ``

(oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

(oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (config): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE config ( id DECIMAL(10) NOT NULL, name VARCHAR(255) NOT NULL, value VARCHAR(255) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_config ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_config BEFORE insert ON config FOR EACH ROW BEGIN select SEQ_config.nextval into :new.id from dual; END; ``

  (oci8po): insert into config values (1, '1', '1') ``

  (oci8po): insert into config values (2, '2', '2') ``

  (oci8po): insert into config values (3, '3', '3') ``

  (oci8po): select * from config ``

  id | name | value
  --- | --- | ---
  1 | 1 | 1
  2 | 2 | 2
  3 | 3 | 3

  ### schemaCourse.xml

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (course): Insert 1 row for testing only...comment out later

  (oci8po): drop table course ``

  (oci8po): drop sequence SEQ_course ``

  (oci8po): CREATE TABLE course ( id DECIMAL(10) NOT NULL, category DECIMAL(10) NOT NULL, sortorder DECIMAL(10) NOT NULL, password VARCHAR(50) NOT NULL, fullname VARCHAR(254) NOT NULL, shortname VARCHAR(15) NOT NULL, summary VARCHAR(4000), format VARCHAR(15) NOT NULL, showgrades DECIMAL(1) NOT NULL, modinfo VARCHAR(4000), newsitems DECIMAL(3) NOT NULL, teacher VARCHAR(100) NOT NULL, teachers VARCHAR(100) NOT NULL, student VARCHAR(100) NOT NULL, students VARCHAR(100) NOT NULL, guest DECIMAL(3) NOT NULL, startdate DECIMAL(10) NOT NULL, numsections DECIMAL(3) NOT NULL, showrecent DECIMAL(3) NOT NULL, marker DECIMAL(10) NOT NULL, maxbytes DECIMAL(10) NOT NULL, showreports DECIMAL(10) NOT NULL, visible DECIMAL(10) NOT NULL, timecreated DECIMAL(10) NOT NULL, timemodified DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_course ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_course BEFORE insert ON course FOR EACH ROW BEGIN select SEQ_course.nextval into :new.id from dual; END; ``

  (oci8po): insert into course values (1, 1, 1, '1', '1', '1', '1', '1', 1, '1', 1, '1', '1', '1', '1', 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into course values (2, 2, 2, '2', '2', '2', '2', '2', 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into course values (3, 3, 3, '3', '3', '3', '3', '3', 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from course ``

  id | category | sortorder | password | fullname | shortname | summary | format | showgrades | modinfo | newsitems | teacher | teachers | student | students | guest | startdate | numsections | showrecent | marker | maxbytes | showreports | visible | timecreated | timemodified
  --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaCourse_categories.xml

  (oci8po): drop table course_categories ``

  (oci8po): drop sequence SEQ_course_categories ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (course_categories): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE course_categories ( id DECIMAL(10) NOT NULL, name VARCHAR(255) NOT NULL, description VARCHAR(4000), parent DECIMAL(10) NOT NULL, sortorder DECIMAL(10) NOT NULL, coursecount DECIMAL(10) NOT NULL, visible DECIMAL(1) NOT NULL, timemodified DECIMAL(1) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_course_categories ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_course_categories BEFORE insert ON course_categories FOR EACH ROW BEGIN select SEQ_course_categories.nextval into :new.id from dual; END; ``

  (oci8po): insert into course_categories values (1, '1', '1', 1, 1, 1, 1, 1) ``

  (oci8po): insert into Course_categories values (2, '2', '2', 2, 2, 2, 2, 2) ``

  (oci8po): insert into Course_categories values (3, '3', '3', 3, 3, 3, 3, 3) ``

  (oci8po): select * from Course_categories ``

  id | name | description | parent | sortorder | coursecount | visible | timemodified
  --- | --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaCourse_display.xml

  (oci8po): drop table course_display ``

  (oci8po): drop sequence SEQ_course_display ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (course_display): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE course_display ( id DECIMAL(10) NOT NULL, course DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, display DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_course_display ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_course_display BEFORE insert ON course_display FOR EACH ROW BEGIN select SEQ_course_display.nextval into :new.id from dual; END; ``

  (oci8po): insert into course_display values (1, 1, 1, 1) ``

  (oci8po): insert into Course_display values (2, 2, 2, 2) ``

  (oci8po): insert into Course_display values (3, 3, 3, 3) ``

  (oci8po): select * from Course_display ``

  id | course | userid | display
  --- | --- | --- | ---
  1 | 1 | 1 | 1
  2 | 2 | 2 | 2
  3 | 3 | 3 | 3

  ### schemaCourse_modules.xml

  (oci8po): drop table course_modules ``

  (oci8po): drop sequence SEQ_course_modules ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (course_modules): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE course_modules ( id DECIMAL(10) NOT NULL, course DECIMAL(10) NOT NULL, module DECIMAL(10) NOT NULL, instance DECIMAL(10) NOT NULL, section DECIMAL(10) NOT NULL, added DECIMAL(10) NOT NULL, deleted DECIMAL(1) NOT NULL, score DECIMAL(1) NOT NULL, indent DECIMAL(10) NOT NULL, visible DECIMAL(1) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_course_modules ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_course_modules BEFORE insert ON course_modules FOR EACH ROW BEGIN select SEQ_course_modules.nextval into :new.id from dual; END; ``

  (oci8po): insert into course_modules values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into Course_modules values (2, 2, 2, 2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into Course_modules values (3, 3, 3, 3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from Course_modules ``

  id | course | module | instance | section | added | deleted | score | indent | visible
  --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaCourse_sections.xml

  (oci8po): drop table course_sections ``

  (oci8po): drop sequence SEQ_course_sections ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (course_sections): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE course_sections ( id DECIMAL(10) NOT NULL, course DECIMAL(10) NOT NULL, section DECIMAL(10) NOT NULL, summary VARCHAR(4000), sequence VARCHAR(4000), visible DECIMAL(1) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_course_sections ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_course_sections BEFORE insert ON course_sections FOR EACH ROW BEGIN select SEQ_course_sections.nextval into :new.id from dual; END; ``

  (oci8po): insert into course_sections values (1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into Course_sections values (2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into Course_sections values (3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from Course_sections ``

  id | course | section | summary | sequence | visible
  --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3

  ### schemaCourse_groups.xml

  (oci8po): drop table course_groups ``

  (oci8po): drop sequence SEQ_course_groups ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (course_groups): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE course_groups ( id DECIMAL(10) NOT NULL, courseid DECIMAL(10) NOT NULL, name VARCHAR(254) NOT NULL, description VARCHAR(4000), lang VARCHAR(10) NOT NULL, picture DECIMAL(10) NOT NULL, timecreated DECIMAL(10) NOT NULL, timemodified DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_course_groups ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_course_groups BEFORE insert ON course_groups FOR EACH ROW BEGIN select SEQ_course_groups.nextval into :new.id from dual; END; ``

  (oci8po): insert into course_groups values (1, 1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into Course_groups values (2, 2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into Course_groups values (3, 3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from Course_groups ``

  id | courseid | name | description | lang | picture | timecreated | timemodified
  --- | --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaCourse_groups_members.xml

  (oci8po): drop table course_groups_members ``

  (oci8po): drop sequence SEQ_course_groups_members ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (course_groups_members): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE course_groups_members ( id DECIMAL(10) NOT NULL, groupid DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, timeadded DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_course_groups_members ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_course_groups_members BEFORE insert ON course_groups_members FOR EACH ROW BEGIN select SEQ_course_groups_members.nextval into :new.id from dual; END; ``

  (oci8po): insert into course_groups_members values (1, 1, 1, 1) ``

  (oci8po): insert into Course_groups_members values (2, 2, 2, 2) ``

  (oci8po): insert into Course_groups_members values (3, 3, 3, 3) ``

  (oci8po): select * from Course_groups_members ``

  id | courseid | name | description
  --- | --- | --- | ---
  1 | 1 | 1 | 1
  2 | 2 | 2 | 2
  3 | 3 | 3 | 3

  ### schemaLog.xml

  (oci8po): drop table log ``

  (oci8po): drop sequence SEQ_log ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (log): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE log ( id DECIMAL(10) NOT NULL, time DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, ip VARCHAR(15) NOT NULL, course DECIMAL(10) NOT NULL, module VARCHAR(10) NOT NULL, action VARCHAR(15) NOT NULL, url VARCHAR(100) NOT NULL, info VARCHAR(255) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_log ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_log BEFORE insert ON log FOR EACH ROW BEGIN select SEQ_log.nextval into :new.id from dual; END; ``

  (oci8po): insert into log values (1, 1, 1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into log values (2, 2, 2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into log values (3, 3, 3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from log ``

  id | time | userid | ip | course | module | action | url | info
  --- | --- | --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaLog_display.xml

  (oci8po): drop table log_display ``

  (oci8po): drop sequence SEQ_log_display ``

  Warning: OCIStmtExecute: ORA-02289: sequence does not exist in C:\Program Files\EasyPHP\www\moodle\lib\adodb\drivers\adodb-oci8.inc.php on line 791
  2289: ORA-02289: sequence does not exist

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (log_display): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE log_display ( module VARCHAR(20) NOT NULL, action VARCHAR(20) NOT NULL, mtable VARCHAR(20) NOT NULL, field VARCHAR(40) NOT NULL ) ``

  (oci8po): insert into log_display values (1, 1, 1, 1) ``

  (oci8po): insert into log_display values (2, 2, 2, 2) ``

  (oci8po): insert into log_display values (3, 3, 3, 3) ``

  (oci8po): select * from log_display ``

  id | time | userid | ip
  --- | --- | --- | ---
  1 | 1 | 1 | 1
  2 | 2 | 2 | 2
  3 | 3 | 3 | 3

  ### schemaModules.xml

  (oci8po): drop table modules ``

  (oci8po): drop sequence SEQ_modules ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (modules): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE modules ( id DECIMAL(10) NOT NULL, name VARCHAR(20) NOT NULL, version DECIMAL(10) NOT NULL, cron DECIMAL(10) NOT NULL, lastcron DECIMAL(10) NOT NULL, search VARCHAR(255) NOT NULL, visible DECIMAL(1) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_modules ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_modules BEFORE insert ON modules FOR EACH ROW BEGIN select SEQ_modules.nextval into :new.id from dual; END; ``

  (oci8po): insert into modules values (1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into modules values (2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into modules values (3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from modules ``

  id | name | version | cron | lastcron | search | visible
  --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaScale.xml

  (oci8po): drop table scale ``

  (oci8po): drop sequence SEQ_scale ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (scale): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE scale ( id DECIMAL(10) NOT NULL, courseid DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, name VARCHAR(255) NOT NULL, scale VARCHAR(4000), description VARCHAR(4000), timemodified DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_scale ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_scale BEFORE insert ON scale FOR EACH ROW BEGIN select SEQ_scale.nextval into :new.id from dual; END; ``

  (oci8po): insert into scale values (1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into scale values (2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into scale values (3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from scale ``

  id | courseid | userid | name | scale | description | timemodified
  --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaUser.xml

  (oci8po): drop table m_user ``

  (oci8po): drop sequence SEQ_m_user ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (m_user): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE m_user ( id DECIMAL(10) NOT NULL, confirmed DECIMAL(1) NOT NULL, deleted DECIMAL(1) NOT NULL, username VARCHAR(100) NOT NULL, password VARCHAR(32) NOT NULL, idnumber VARCHAR(12) NOT NULL, firstname VARCHAR(20) NOT NULL, lastname VARCHAR(20) NOT NULL, email VARCHAR(100) NOT NULL, icq VARCHAR(15), phone1 VARCHAR(20), phone2 VARCHAR(20), institution VARCHAR(40), department VARCHAR(30), address VARCHAR(70), city VARCHAR(20), country VARCHAR(20), lang VARCHAR(5) NOT NULL, timezone DECIMAL NOT NULL, firstaccess DECIMAL(10) NOT NULL, lastaccess DECIMAL(10) NOT NULL, lastlogin DECIMAL(10) NOT NULL, currentlogin DECIMAL(10) NOT NULL, lastIP VARCHAR(15), secret VARCHAR(15) NOT NULL, picture DECIMAL(1), url VARCHAR(100), description VARCHAR(4000), mailformat DECIMAL(1) NOT NULL, maildisplay DECIMAL(1) NOT NULL, htmleditor DECIMAL(1) NOT NULL, autosubscribe DECIMAL(1) NOT NULL, timemodified DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_m_user ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_m_user BEFORE insert ON m_user FOR EACH ROW BEGIN select SEQ_m_user.nextval into :new.id from dual; END; ``

  (oci8po): insert into m_user values (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into m_user values (2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into m_user values (3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from m_user ``

  id | confirmed | deleted | m_username | password | idnumber | firstname | lastname | email | icq | phone1 | phone2 | institution | department | address | city | country | lang | timezone | firstaccess | lastaccess | lastlogin | currentlogin | lastIP | secret | picture | url | description | mailformat | maildisplay | htmleditor | autosubscribe | timemodified
  --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaUser_admins.xml

  (oci8po): drop table user_admins ``

  (oci8po): drop sequence SEQ_user_admins ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (user_admins): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE user_admins ( id DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_user_admins ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_user_admins BEFORE insert ON user_admins FOR EACH ROW BEGIN select SEQ_user_admins.nextval into :new.id from dual; END; ``

  (oci8po): insert into user_admins values (1, 1) ``

  (oci8po): insert into user_admins values (2, 2) ``

  (oci8po): insert into user_admins values (3, 3) ``

  (oci8po): select * from user_admins ``

  id | userid
  --- | ---
  1 | 1
  2 | 2
  3 | 3

  ### schemaUser_students.xml

  (oci8po): drop table user_students ``

  (oci8po): drop sequence SEQ_user_students ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (user_students): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE user_students ( id DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, course DECIMAL(10) NOT NULL, timestart DECIMAL(10) NOT NULL, timeend DECIMAL(10) NOT NULL, time DECIMAL(10) NOT NULL, timeaccess DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_user_students ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_user_students BEFORE insert ON user_students FOR EACH ROW BEGIN select SEQ_user_students.nextval into :new.id from dual; END; ``

  (oci8po): insert into user_students values (1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into user_students values (2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into user_students values (3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from user_students ``

  id | userid | course | timestart | timeend | time | timeaccess
  --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaUser_teachers.xml

  (oci8po): drop table user_teachers ``

  (oci8po): drop sequence SEQ_user_teachers ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (user_teachers): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE user_teachers ( id DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, course DECIMAL(10) NOT NULL, authority DECIMAL(10) NOT NULL, role VARCHAR(40) NOT NULL, editall DECIMAL(1) NOT NULL, timemodified DECIMAL(10) NOT NULL, timeaccess DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_user_teachers ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_user_teachers BEFORE insert ON user_teachers FOR EACH ROW BEGIN select SEQ_user_teachers.nextval into :new.id from dual; END; ``

  (oci8po): insert into user_teachers values (1, 1, 1, 1, 1, 1, 1, 1) ``

  (oci8po): insert into user_teachers values (2, 2, 2, 2, 2, 2, 2, 2) ``

  (oci8po): insert into user_teachers values (3, 3, 3, 3, 3, 3, 3, 3) ``

  (oci8po): select * from user_teachers ``

  id | userid | course | authority | role | editall | timemodified | timeaccess
  --- | --- | --- | --- | --- | --- | --- | ---
  1 | 1 | 1 | 1 | 1 | 1 | 1 | 1
  2 | 2 | 2 | 2 | 2 | 2 | 2 | 2
  3 | 3 | 3 | 3 | 3 | 3 | 3 | 3

  ### schemaUser_coursecreators.xml

  (oci8po): drop table user_coursecreators ``

  (oci8po): drop sequence SEQ_user_coursecreators ``

  (oci8po): select value from sys.database_compatible_level ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

  (oci8po): select lower(table_name), table_type from cat where table_type in ('TABLE', 'VIEW') ``

- (user_coursecreators): Insert 1 row for testing only...comment out later

  (oci8po): CREATE TABLE user_coursecreators ( id DECIMAL(10) NOT NULL, userid DECIMAL(10) NOT NULL, PRIMARY KEY (id) ) ``

  (oci8po): CREATE SEQUENCE SEQ_user_coursecreators ``

  (oci8po): CREATE OR REPLACE TRIGGER TRIG_SEQ_user_coursecreators BEFORE insert ON user_coursecreators FOR EACH ROW BEGIN select SEQ_user_coursecreators.nextval into :new.id from dual; END; ``

  (oci8po): insert into user_coursecreators values (1, 1) ``

  (oci8po): insert into user_coursecreators values (2, 2) ``

  (oci8po): insert into user_coursecreators values (3, 3) ``

  (oci8po): select * from user_coursecreators ``

  id | userid
  --- | ---
  1 | 1
  2 | 2
  3 | 3