A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Creating a quiz database...



 
 
Thread Tools Display Modes
  #1  
Old October 26th, 2004, 11:19 PM
Jimbo
external usenet poster
 
Posts: n/a
Default Creating a quiz database...

I"m trying to create a database of practice questions and answers for my
students, some of the questions have multiple answers. How should I go about
identifying (and storing) multiple correct answers to these questions? Any
help greatly appreciated.


  #2  
Old October 27th, 2004, 05:07 AM
Allen Browne
external usenet poster
 
Posts: n/a
Default

The basic structure would be something like this:

Question table: one record for each question.
QuestionID Number primary key.
QuestionText Text what the question says.

Answer table: one record for each possible answer.
QuestionID Number foreign key to Question.QuestionID
AnswerCode Text a for first, b for 2nd, etc.
AnswerText Text what this answer says.
AnswerValue Number 0 for wrong answer, 1 for right answer.
Primary key could be QuestionID + AnswerCode.

Then, if you want to record what answers people actually gave, you would
need:
Client table: one record for each person who takes the quiz.
ClientID AutoNumber primary key

ClientAnswer table: one record for each answer given by each person.
ClientID Number foreign key to Client.ClientID
QuestionID Number foreign key to Answer.QuestionID
AnswerCode Text foreign key to Answer.AnswerCode.
You could make the combination of ClientID + QuestionID unique (e.g. primary
key), and the relationship to the Answer table based on QuestionID +
AnswerCode.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jimbo" wrote in message
...
I"m trying to create a database of practice questions and answers for my
students, some of the questions have multiple answers. How should I go
about
identifying (and storing) multiple correct answers to these questions? Any
help greatly appreciated.



  #3  
Old March 17th, 2005, 03:01 AM
dynes
external usenet poster
 
Posts: n/a
Default


hi Allen.
I tried the one you wrote, but i encounter errors on the AnswerCode and
AnswerValue Field. When i try to enter records/values an error appears on my
screen., it says "The changes you requestd to the table were not successful
because they would create duplicate values in hte index, primary key or
relatinship". Can you give me a detail instruction on how to do it? or
suggest me a site i can browse?
Thanks... Your help is greatly appreciated...

"Allen Browne" wrote:

The basic structure would be something like this:

Question table: one record for each question.
QuestionID Number primary key.
QuestionText Text what the question says.

Answer table: one record for each possible answer.
QuestionID Number foreign key to Question.QuestionID
AnswerCode Text a for first, b for 2nd, etc.
AnswerText Text what this answer says.
AnswerValue Number 0 for wrong answer, 1 for right answer.
Primary key could be QuestionID + AnswerCode.

Then, if you want to record what answers people actually gave, you would
need:
Client table: one record for each person who takes the quiz.
ClientID AutoNumber primary key

ClientAnswer table: one record for each answer given by each person.
ClientID Number foreign key to Client.ClientID
QuestionID Number foreign key to Answer.QuestionID
AnswerCode Text foreign key to Answer.AnswerCode.
You could make the combination of ClientID + QuestionID unique (e.g. primary
key), and the relationship to the Answer table based on QuestionID +
AnswerCode.

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Jimbo" wrote in message
...
I"m trying to create a database of practice questions and answers for my
students, some of the questions have multiple answers. How should I go
about
identifying (and storing) multiple correct answers to these questions? Any
help greatly appreciated.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Archiving A Database PC User General Discussion 2 November 2nd, 2004 11:16 PM
What is MDE Charlie General Discussion 4 August 24th, 2004 04:15 PM
Creating a Multiuser Database Angela Charsha Database Design 1 June 9th, 2004 04:13 AM


All times are GMT +1. The time now is 05:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.