I'm building an online examination application, the purpose of app is, it can allow teacher create courses, topics of course, and questions (every question has mark), and teacher can create examinations for students and students can do examinations online. As I will use many word examination and examinations, so i will call it exam and exams for shorter.
About business of my app:
- Teacher can create topics, questions and every topic, question only belongs to one teacher.
- Teacher can create a
general examfor a course, it will get a collection of questions fromquestion bank. - From that
general exam, teacher will generate and anumber of examscorresponding withnumber of studentsneed to do course's exam. Exams will be assigned to students auto and random after generated. Exams are generated will have different
number of questions, but thetotal mark of questionsin every exam will be the same. Example, after exams generated:Student A take exam with 20 questions, student B take exam only has 10 questions, it means maybe every question in exam of student A only has mark is 1, but questions in exam of student B has mark is 2.So 20 = 10 x 2, this is what i means
total mark of questions in every examination will be the same.
I have designed tables for:
- User (include students and teachers account)
- Course
- Topic
- Question
- Answer
When students do exam, I think it will have table:
- Result, with columns: user_id, exam_id, mark
This is table i think i will create for general examination:
- GeneralExamination, with columns: name, description, dateStart, dateFinish, numberOfMinutes, maxMarkOfExam
But now i don't know how to set up associations between user(student), question, exam, general exam. To sum up associations:
- Student can do many exams.
- Students only can do exams which assigned to them.
- A
general examhas many questions, got from question bank, but every exam will get questions fromgeneral examgenerated them. - Exams belongs to one
general examination, which used to generated them.
How can i set up those associations?