CREATE TABLE TiberDM.QuestionFact (
    id                  MEDIUMINT   NOT NULL AUTO_INCREMENT,
    SchoolDimId         MEDIUMINT   NOT NULL,
    AcademicYearDimId   MEDIUMINT   NOT NULL,
    ExamDimId           MEDIUMINT   NOT NULL,
    QuestionDimId       MEDIUMINT   NOT NULL,
    StudentDimId        MEDIUMINT   NOT NULL,
    Answer              CHAR(3)     NOT NULL,
    IsCorrect           Bool             NOT NULL,
    questionPoints      DECIMAL(10,2)   NOT NULL,
    PRIMARY KEY (id)
);

Create Unique Index QuestionFact_Uidx01
On TiberDM.QuestionFact (SchoolDimId, AcademicYearDimId, ExamDimId, QuestionDimId, StudentDimId);
;
