# Quizzer
Quizzer is a quizz maker and management application based on Razor.  
It implements MC questions and MC quizzes later to be expanded.  
It also implements Tags which should be applied to all questions to allow for random quizz building.
## Database tables
**Categories**
```
CREATE TABLE `Cats` (
	`CId` VARCHAR(50) NOT NULL DEFAULT 'NA' COLLATE 'utf8mb4_general_ci',
	`UID` VARCHAR(256) NOT NULL DEFAULT '/' COLLATE 'utf8mb4_general_ci',
	`CParentId` VARCHAR(50) NOT NULL DEFAULT '/' COLLATE 'utf8mb4_general_ci',
	`Txt` VARCHAR(50) NOT NULL DEFAULT 'NA' COLLATE 'utf8mb4_general_ci',
	`Descr` VARCHAR(1024) NOT NULL DEFAULT 'NA' COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`CId`) USING BTREE,
	INDEX `TId` (`CId`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
```
**Questions**
```
CREATE TABLE `Questions` (
	`QId` CHAR(50) NOT NULL,
	`Txt` VARCHAR(512) NOT NULL DEFAULT '0',
	PRIMARY KEY (`QId`)
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
```
**Journals**
```
CREATE TABLE `Journals` (
	`PID` VARCHAR(256) NOT NULL COLLATE 'utf8mb4_general_ci',
	`QuizzID` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_general_ci',
	`Category` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_general_ci',
	`IsOpen` INT(11) NOT NULL DEFAULT '1',
	`Score` INT(11) NOT NULL,
	`ScoreAcc` INT(11) NOT NULL,
	`JournalJson` VARCHAR(2048) NOT NULL COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`PID`, `QuizzID`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
```
**Questions**
```
CREATE TABLE `Questions` (
	`QuestionID` VARCHAR(50) NOT NULL DEFAULT 'ERROR' COLLATE 'utf8mb4_general_ci',
	`QuestionType` VARCHAR(50) NOT NULL DEFAULT '' COLLATE 'utf8mb4_general_ci',
	`Category` VARCHAR(50) NOT NULL DEFAULT '/' COLLATE 'utf8mb4_general_ci',
	`QuestionText` VARCHAR(512) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
	`ContentJson` VARCHAR(1024) NOT NULL DEFAULT '0' COLLATE 'utf8mb4_general_ci',
	PRIMARY KEY (`QuestionID`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
```
**Quizzes**
```
CREATE TABLE `Quizzs` (
	`QuizzId` VARCHAR(50) NOT NULL DEFAULT 'na' COLLATE 'utf8mb4_general_ci',
	`Owner` VARCHAR(256) NOT NULL DEFAULT 'na' COLLATE 'utf8mb4_general_ci',
	`Class` VARCHAR(50) NOT NULL DEFAULT 'na' COLLATE 'utf8mb4_general_ci',
	`Category` VARCHAR(50) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`Descr` VARCHAR(1024) NULL DEFAULT NULL COLLATE 'utf8mb4_general_ci',
	`Anonymous` INT(11) NULL DEFAULT '0',
	`QSize` INT(10) UNSIGNED NOT NULL DEFAULT '5',
	PRIMARY KEY (`QuizzId`) USING BTREE
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
```
**Statistics**
```
CREATE TABLE `Statistics` (
	`QuizzID` VARCHAR(50) NULL DEFAULT 'na' COLLATE 'utf8mb4_general_ci',
	`Version` INT(11) NULL DEFAULT '0',
	`StatsJson` VARCHAR(8192) NULL DEFAULT NULL COLLATE 'utf8mb3_bin'
)
COLLATE='utf8mb4_general_ci'
ENGINE=InnoDB
;
```
