Hello,
I need your expert help in creating a db for a Poll Ranking application. The idea is, a school wants to conduct a poll at the end of a schoolyear. There are 20 teachers and 100 classes in total. Each teacher is required to rank these 100 classes. At the end, the poll yields the rank of each class.
Here are the databases I've got:
- tblTeacher: teacherId | teacherName
- tblClass : classId | classDesc
Now, the ranking result will look like:
teacher #1 - rank #1 - class #26
rank #2 - class #53
rank #3 - class #...
....
rank #100 - ...
teacher #2 - rank #1 - class #...
...
rank #100 - ...
Since each teacher is required to rank all 100 classes, there will be 20 (teachers) x 100 (classes) = 2000 ranking records.
I'm not sure how the db schema for the ranking results would be like? I'm thinking:
- tblRank : t1rk1 | t1rk2 | t1rk3 | ... | t1rk100 | t2rk1 | ... | t2rk100 | ... | t100rk100
It means this "tblRank" will have 2000 fields, and each field stores the 'classId'. 't#rk#' = 'teacherId_rankId'
Is this a good schema for 'tblRank'? I'd be a pain if we need to add a new class, #101, or a new teacher #21.
Please help.
Thanks.
allan
I need your expert help in creating a db for a Poll Ranking application. The idea is, a school wants to conduct a poll at the end of a schoolyear. There are 20 teachers and 100 classes in total. Each teacher is required to rank these 100 classes. At the end, the poll yields the rank of each class.
Here are the databases I've got:
- tblTeacher: teacherId | teacherName
- tblClass : classId | classDesc
Now, the ranking result will look like:
teacher #1 - rank #1 - class #26
rank #2 - class #53
rank #3 - class #...
....
rank #100 - ...
teacher #2 - rank #1 - class #...
...
rank #100 - ...
Since each teacher is required to rank all 100 classes, there will be 20 (teachers) x 100 (classes) = 2000 ranking records.
I'm not sure how the db schema for the ranking results would be like? I'm thinking:
- tblRank : t1rk1 | t1rk2 | t1rk3 | ... | t1rk100 | t2rk1 | ... | t2rk100 | ... | t100rk100
It means this "tblRank" will have 2000 fields, and each field stores the 'classId'. 't#rk#' = 'teacherId_rankId'
Is this a good schema for 'tblRank'? I'd be a pain if we need to add a new class, #101, or a new teacher #21.
Please help.
Thanks.
allan