View Single Post
  #2  
Old October 16th, 2005, 01:16 AM
tina
external usenet poster
 
Posts: n/a
Default Design Quandary...

However, I'm confused; each question only has one answer, but then again,
many students answer the same question, with different answers.


do you mean that each question has only one *correct* answer? if you're
simply tracking each answer that each student gives to each question, then
"correctness" is not really an issue, is it? for simple tracking, you're on
the right "track" (pun intended g). three data tables should do it:

tblStudents
StudentID (primary key)
[other fields that describe a student, such as FirstName, LastName, etc.]

tblQuestions
QuestionID (pk)
Question
[if each question has only one correct answer, you could include a field for
CorrectAnswer in this table, if you need it.]

tblStudentAnswers
StudentID (foreign key from tblStudents)
QuestionID (foreign key from tblQuestions)
Answer
[if each student may answer each question *only once*, then you can use the
two foreign key fields as a combination primary key for this table.
otherwise, you can add an AnswerID field as the primary key field.]

the relationships a
tblStudents 1:n tblStudentAnswers
tblQuestions 1:n tblStudentAnswers

hth


"Access rookie" wrote in message
...
Hello,

I'm trying to put together a database that hosts the answers to questions
posed to students. I have all the students in one table, all the questions

in
another, and I'm attempting to put all the answers in one table.

Here's my thoughts: Student to Questions: Many to many linked by a

junction
table.
Question to answer: One to many.

However, I'm confused; each question only has one answer, but then again,
many students answer the same question, with different answers.

Any help would be greatly appreciated.

Thanks,

Rookie.