need help with table

  • i want to make a question bank database for my web application.

    i am doing the table structure.

    i have come upto this..

    Table Subject{subject_id(pk),subject_name}

    Table Question {subject_id(fk),question_id(pk),question_description}

    Table Quiz{subject_id(fk),question_id(fk),choice1,choice2,choice3,choice4}

    TableAnswer{subject_id(fk),question_id(fk),answer_choice,answer_description}

    but this is not correct i think ....this design is not perfect i believe....i am not happy with the design ...do you see any redundancy ? some drawback ?

    can anybody help me to correct it ?

  • I am wondering why you think this design is not perfect......

  • 1. Tables Quiz and Answer do not need the subject_id field. This is because that can be determined from Table Question which falls under a Subject.

    2. Not that it's necessary or efficient, but if you wish to keep this in normalized form you can update table Quizz to something like this:

    {quistion_id(fk), choice_number, choice} This will eliminate repeating fields.

    Eli

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply