/lenasys/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/lenasys/trunk

« back to all changes in this revision

Viewing changes to databas.sql

  • Committer: a11andoh
  • Date: 2013-05-21 14:40:12 UTC
  • mto: This revision was merged to the branch mainline in revision 85.
  • Revision ID: a11andoh@student.his.se-20130521144012-adqsnpzovt49kdoc
Added the correct coursenames and courseID. 
Also corrected the corresponding info in user, category, and subcategory

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
CREATE SCHEMA IF NOT EXISTS `lenasys` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
 
1
DROP DATABASE `lenasys` ;
 
2
CREATE SCHEMA IF NOT EXISTS `lenasys` DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci ;
2
3
USE `lenasys` ;
3
4
-- -----------------------------------------------------
4
5
 
7
8
-- -----------------------------------------------------
8
9
CREATE  TABLE IF NOT EXISTS `lenasys`.`Courses` (
9
10
  `courseID` VARCHAR(10) NOT NULL ,
10
 
  `name` VARCHAR(45) NULL ,
 
11
  `name` VARCHAR(50) NULL ,
11
12
  `courseData` VARCHAR(128) NULL , -- explanation about course, example: G1N 7,5hp  + additional text
12
13
  `isHidden` BIT(1) NOT NULL DEFAULT 0 ,
13
14
  `isPublic` BIT(1) NOT NULL DEFAULT 1 ,
288
289
-- -------------------------------------------------
289
290
 
290
291
INSERT INTO `Courses`(`courseID`, `name`, `courseData`) 
291
 
VALUES('DA133G'  , 'Webbutveckling - datorgrafik G1N' , ' 7,5hp (IKI)'),
292
 
('d1popcrn'  , 'Webbutveckling - Läran om Gson' , ' 7,5hp (IKI)'),
293
 
('DAG123'  , 'Webbutveckling - Nånting' , ' 7,5hp (IKI)');
 
292
VALUES('DA146G'  , 'Computer Graphics' , ' 7,5hp (IKI)'),
 
293
('IS317G'  , 'Database Construction' , ' 7,5hp (IKI)'),
 
294
('IS114G'  , 'Database Systems' , ' 7,5hp (IKI)'),
 
295
('DV313G'  , 'Webdevelopment - XML API' , ' 7,5hp (IKI)'),
 
296
('DA330G'  , 'Webprogramming' , ' 7,5hp (IKI)'),
 
297
('DA525G'  ,  'Advanced Computer Graphics and Shader Programming'  ,  ' 7,5hp (IKI)');
294
298
 
295
299
INSERT INTO `lenasys`.`Users` (`userName`,`name`,`passwd`, passwdHint,`userType`,`ssn`,`activeCourse`) 
296
 
VALUES ('student','Per Student','06d31954049ffa053039ae83bab3dcd0ebc67195','gamla vanliga' ,2,'19900385-2345', 'DA133G'),
297
 
('student2','Gösta Student','06d31954049ffa053039ae83bab3dcd0ebc67195','SypARN',2,'19800385-2385','d1popcrn' ),
298
 
('lärare','Kalle Lärare','06d31954049ffa053039ae83bab3dcd0ebc67195','Syp och året då Sverige först tillåter kommersiell radio x2',1,'19800385-2325', 'd1popcrn' );
 
300
VALUES ('student','Per Student','06d31954049ffa053039ae83bab3dcd0ebc67195','gamla vanliga' ,2,'19900385-2345', 'DA330G'),
 
301
('student2','Gösta Student','06d31954049ffa053039ae83bab3dcd0ebc67195','SypARN',2,'19800385-2385','DA525G' ),
 
302
('lärare','Kalle Lärare','06d31954049ffa053039ae83bab3dcd0ebc67195','Syp och året då Sverige först tillåter kommersiell radio x2',1,'19800385-2325', 'DV313G' );
299
303
 
300
304
 
301
305
INSERT INTO `StudentCourseRegistrations`(`courseOccasion`, `userName`, `courseID`) 
302
 
VALUES ('HT2012 period 2','student','d1popcrn'),
303
 
('HT2012 period 2','student','DA133G'),
304
 
('HT2012 period 2','student2','d1popcrn'),
305
 
('HT2012 period 2','student2','DAG123');
 
306
VALUES ('HT2012 period 2','student','DV313G'),
 
307
('HT2012 period 2','student','DA525G'),
 
308
('HT2012 period 2','student2','DV313G'),
 
309
('HT2012 period 2','student2','DA330G');
306
310
 
307
311
INSERT INTO `Categories`(`categoryName`, `courseID`, `orderNr`) 
308
 
VALUES ('Vektorgrafik','DA133G', 1),
309
 
('Shading','DA133G', 2),
310
 
('3D','DA133G', 3),
311
 
('Tidigt 90-tal','d1popcrn', 1),
312
 
('Categorie i nånting','DAG123', 1),
313
 
('Categorie i någontingen mer','DAG123', 2);
 
312
VALUES ('Vektorgrafik','DA525G', 1),
 
313
('Shading','DA525G', 2),
 
314
('3D','DA525G', 3),
 
315
('Tidigt 90-tal','DV313G', 1),
 
316
('Categorie i nånting','DA330G', 1),
 
317
('Categorie i någontingen mer','DA330G', 2);
314
318
 
315
319
INSERT INTO `SubCategories`(`subCategoryName`, `categoryName`, `courseID`, `orderNr`) 
316
 
VALUES ('Punkt' ,'Vektorgrafik','DA133G', 1),
317
 
('Linjer' ,'Vektorgrafik','DA133G', 2),
318
 
('Böjningar' ,'Vektorgrafik','DA133G', 3),
319
 
('Vertexshading','Shading','DA133G', 1),
320
 
('Globalshading','Shading','DA133G', 2),
321
 
('Bra 3d' , '3D','DA133G', 1),
322
 
('Dålig 3d' , '3D','DA133G', 2),
323
 
('Smurfhits','Tidigt 90-tal','d1popcrn', 1),
324
 
('NES','Tidigt 90-tal','d1popcrn', 2),
325
 
('Sovmorgon','Tidigt 90-tal','d1popcrn', 3),
326
 
('Subcategorie i nånting' ,'Categorie i nånting','DAG123', 1),
327
 
('Subcategorie2 i nånting' ,'Categorie i nånting','DAG123', 2),
328
 
('Subcategorie i nåntingen mer', 'Categorie i någontingen mer','DAG123', 1),
329
 
('Subcategorie2 i nåntingen mer', 'Categorie i någontingen mer','DAG123', 2);
 
320
VALUES ('Punkt' ,'Vektorgrafik','DA525G', 1),
 
321
('Linjer' ,'Vektorgrafik','DA525G', 2),
 
322
('Böjningar' ,'Vektorgrafik','DA525G', 3),
 
323
('Vertexshading','Shading','DA525G', 1),
 
324
('Globalshading','Shading','DA525G', 2),
 
325
('Bra 3d' , '3D','DA525G', 1),
 
326
('Dålig 3d' , '3D','DA525G', 2),
 
327
('Smurfhits','Tidigt 90-tal','DV313G', 1),
 
328
('NES','Tidigt 90-tal','DV313G', 2),
 
329
('Sovmorgon','Tidigt 90-tal','DV313G', 3),
 
330
('Subcategorie i nånting' ,'Categorie i nånting','DA330G', 1),
 
331
('Subcategorie2 i nånting' ,'Categorie i nånting','DA330G', 2),
 
332
('Subcategorie i nåntingen mer', 'Categorie i någontingen mer','DA330G', 1),
 
333
('Subcategorie2 i nåntingen mer', 'Categorie i någontingen mer','DA330G', 2);
330
334
 
331
335
 
332
336
 
333
337
INSERT INTO Quizzes(`quizNr`, `subCategoryName`, `categoryName`, `courseID`, `quizData`, `allowMultipleReplies`,`autoCorrected`, `openingDate`,`closingDate` ) 
334
 
VALUES(1,'punkt' ,'Vektorgrafik','DA133G','Svara så gott du kan, lycka till',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00'),
335
 
(2,'punkt' ,'Vektorgrafik','DA133G','Lol glhf',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00'),
336
 
(3,'punkt' ,'Vektorgrafik','DA133G','ajaja detta kommer nu gå bra *NAWHT*',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00'),
337
 
(1,'linjer' ,'Vektorgrafik','DA133G','happ happ lycka till',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00');
 
338
VALUES(1,'punkt' ,'Vektorgrafik','DA525G','Svara så gott du kan, lycka till',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00'),
 
339
(2,'punkt' ,'Vektorgrafik','DA525G','Lol glhf',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00'),
 
340
(3,'punkt' ,'Vektorgrafik','DA525G','ajaja detta kommer nu gå bra *NAWHT*',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00'),
 
341
(1,'linjer' ,'Vektorgrafik','DA525G','happ happ lycka till',1,1, '2013-05-20 08:00:00','2013-05-25 23:59:00');
338
342
  
339
343
 INSERT INTO QuizQuestions(`questionID`, `quizNr`, `subCategoryName`, `categoryName`, `courseID`, `questionData`, `correctAnswer`) 
340
 
 VALUES(1,1,'punkt' ,'Vektorgrafik','DA133G','vad är roten av pi plus solens massa?','inte vet jag lol'),
341
 
(2,1,'punkt' ,'Vektorgrafik','DA133G','hur mår du?','Bra som bara den');
 
344
 VALUES(1,1,'punkt' ,'Vektorgrafik','DA525G','vad är roten av pi plus solens massa?','inte vet jag lol'),
 
345
(2,1,'punkt' ,'Vektorgrafik','DA525G','hur mår du?','Bra som bara den');
342
346
 
343
347
INSERT INTO Examples(`exampleName`, `subCategoryName`, `categoryName`, `courseID`, `orderNr`, `description`) 
344
 
VALUES('punkt example 1','punkt' ,'Vektorgrafik','DA133G',1,'nån sorts förklaring om punkter'),
345
 
('punkt example 2','punkt' ,'Vektorgrafik','DA133G',2,'nån sorts förklaring om punkter i example 2'),
346
 
('ett till exempel','punkt' ,'Vektorgrafik','DA133G',3,'nån sorts förklaring om punkter igen'),
347
 
('linjer example 1','linjer' ,'Vektorgrafik','DA133G',1,'nån sorts förklaring om linjer');
 
348
VALUES('punkt example 1','punkt' ,'Vektorgrafik','DA525G',1,'nån sorts förklaring om punkter'),
 
349
('punkt example 2','punkt' ,'Vektorgrafik','DA525G',2,'nån sorts förklaring om punkter i example 2'),
 
350
('ett till exempel','punkt' ,'Vektorgrafik','DA525G',3,'nån sorts förklaring om punkter igen'),
 
351
('linjer example 1','linjer' ,'Vektorgrafik','DA525G',1,'nån sorts förklaring om linjer');
348
352
 
349
353
INSERT INTO Files(`fileName`,`fileType`,`codeLanguage`, `dataBlob`) 
350
354
VALUES('exempel fil1',1,'html','Lorem ipsum dolor sit amet, consectetur adipiscing elit.