/*
DELETE FROM volltextindex;
DELETE FROM woerterbuch;
DELETE FROM attribut;
DELETE FROM dokument;
*/

INSERT INTO dokument(did, autor, titel, inhalt)
VALUES
 (1, 'Wolfgang Kowarschick',
     'Skript zur Vorlesung MMDB', 
     'Vorlesung MM-Datenbanksysteme im WiSe 2009/2010'
 ),
 (2, 'Wolfgang Kowarschick',
     'Skript zur Vorlesung MMProg',
     'Vorlesung MM-Programmierung im WiSe 2009/2010'
 ),
 (3, 'Christian Märtin, Rolf Socher, Michael Lutz',
     'Theoretische Grundlagen der Informatik',
     'Theoretische Grundlagen der Informatik, 3. Auflage'
 ),
 (4, 'Wolfgang Kowarschick',
     'Skript zur Vorlesung PM',
     NULL
 )
;

INSERT INTO attribut(aid, attr)
VALUES
  (1, 'autor'),
  (2, 'titel'),
  (3, 'inhalt')
;

INSERT INTO woerterbuch(wort, wid)
VALUES
  ('wolfgang',         1),
  ('kowarschick',      2),
  ('skript',           3),
  ('zur',              4),
  ('vorlesung',        5),
  ('mmdb',             6),
  ('mm',               7),
  ('datenbanksysteme', 8),
  ('im',               9),
  ('wise',            10),
  ('2009',            12),
  ('2010',            12),
  ('mmprog',          13),
  ('programmierung',  14),
  ('christian',       15),
  ('maertin',         16),
  ('rolf',            17),
  ('socher',          18),
  ('michael',         19),
  ('lutz',            20),
  ('theoretische',    21),
  ('grundlagen',      22),
  ('der',             23),
  ('informatik',      24),
  ('3',               25),
  ('auflage',         26),
  ('pm',              27)
;

INSERT INTO woerterbuch(wort, wid)
VALUES
  ('@gnagflow',         1),
  ('@kcihcsrawok',      2),
  ('@tpirks',           3),
  ('@ruz',              4),
  ('@gnuselrov',        5),
  ('@dbmm',             6),
  ('@mm',               7),
  ('@emetsysknabnetad', 8),
  ('@mi',               9),
  ('@esiw',            10),
  ('@9002',            12),
  ('@0102',            12),
  ('@gorpmm',          13),
  ('@gnureimmargorp',  14),
  ('@naitsirhc',       15),
  ('@nitream',         16),
  ('@flor',            17),
  ('@rehcos',          18),
  ('@leahcim',         19),
  ('@ztul',            20),
  ('@ehcsiteroeht',    21),
  ('@negaldnurg',      22),
  ('@red',             23),
  ('@kitamrofni',      24),
  ('@3',               25),
  ('@egalfua',         26),
  ('@mp',              27)
;



INSERT INTO volltextindex(did, wid, aid, pos)
VALUES
(1,  1, 1, 1),
(1,  2, 1, 2),
(1,  3, 2, 1),
(1,  4, 2, 2),
(1,  5, 2, 3),
(1,  6, 2, 4),
(1,  5, 3, 1),
(1,  7, 3, 2),
(1,  8, 3, 3),
(1,  9, 3, 4),
(1, 10, 3, 5),
(1, 11, 3, 6),
(1, 12, 3, 7),
(2,  1, 1, 1),
(2,  2, 1, 2),
(2,  3, 2, 1),
(2,  4, 2, 2),
(2,  5, 2, 3),
(2, 13, 2, 4),
(2,  5, 3, 1),
(2,  7, 3, 2),
(2, 14, 3, 3),
(2,  9, 3, 4),
(2, 10, 3, 5),
(2, 11, 3, 6),
(2, 12, 3, 7),
(3, 15, 1, 1),
(3, 16, 1, 2),
(3, 17, 1, 3),
(3, 18, 1, 4),
(3, 19, 1, 5),
(3, 20, 1, 6),
(3, 21, 2, 1),
(3, 22, 2, 2),
(3, 23, 2, 3),
(3, 24, 2, 4),
(3, 21, 3, 1),
(3, 22, 3, 2),
(3, 23, 3, 3),
(3, 24, 3, 4),
(3, 25, 3, 5),
(3, 26, 3, 6),
(4,  1, 1, 1),
(4,  2, 1, 2),
(4,  3, 2, 1),
(4,  4, 2, 2),
(4,  5, 2, 3),
(4, 27, 2, 4)
;
