As a student CGI programmer, I've been working on an online questionnaire.
I have been working so hard to design the mysql db part, still I'm not
sure if I've done it right. Still somethings seem to be awkward. 

Here I'm  DESCRIBing  the tables for you, then i'm explaining how I
inteded to use it:

mysql> DESC cral2_questions;
+-------------+-------------------+------+-----+---------+----------------+---------------------------------+
| Field       | Type              | Null | Key | Default | Extra
+-------------+-------------------+------+-----+---------+----------------+---------------------------------+
| question_id | int(10) unsigned  |      | PRI | NULL    | auto_increment
| question    | text              |      |     |         |
| type        | enum('r','c','t') |      |     | r       |
| calculate   | enum('yes','no')  | YES  |     | NULL    |
+-------------+-------------------+------+-----+---------+----------------+---------------------------------+
4 rows in set (0.01 sec) 



mysql> DESC cral2_answers;
+----------------+------------------+------+-----+---------+-------+---------------------------------+
| Field          | Type             | Null | Key | Default | Extra |
+----------------+------------------+------+-----+---------+-------+---------------------------------+
| answer_id      | int(10) unsigned |      |     | 0       |       |
| question_id    | int(10) unsigned |      |     | 0       |       |
| answer         | char(200)        |      |     |         |       |
| if_checked     | int(10) unsigned | YES  |     | NULL    |       |
| if_not_checked | int(10) unsigned | YES  |     | NULL    |       |
+----------------+------------------+------+-----+---------+-------+---------------------------------+
5 rows in set (0.00 sec)



The first table stores questions and the second one stores their answers.
If you look at the type column, r stands for RADIO BUTTONED, which means
only one of the options could be checked, c means CHECK BOXED or "CHECK
ALL THAT APPLY" type of questions, and t stands for TEXT FIELDED, and
respondent would have to type something in, which will  be matched agains
a respective REGEXP. 


CGI script also calculates the results, and provides an instant feedback
depending on the score a student gets. Of course in addition to the above
tables, I'll be needing a table for storing each students information by
assigning an auto_incrementing number for each student, storing the the
students answers, answer key table. 

Do you guys think I'm making it too much complicated? I can give you the
link for the initial step of the application. I developed it for the
experts where they rated and provided feedback for each item, according to
which we had to fine-tune the questions. Since we have the fine-tuned
questions now, I started working on the final part (for students). 

URL: http://www.ultracgis.com/cgi-bin/cral.v1.cgi

You can access the questionnaire from here. And the control panel is at

http://www.ultracgis.com/cgi-bin/cral.v1.cgi/ControlPanel


I really need experts ideas. 


Thank you 









-------------------------
-sherzodR

phone: (517) 774-2702
email: [EMAIL PROTECTED]





---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to