If you want to store all of the answers (not just the correct one) for each
question, I think you're actually looking at 3 tables:
tblExam - ExamId(PK), ExamName, ExamDate, etc.
tblQuestion - QuestionID(PK), ExamId(FK), QuestionText, etc.
tblAnswer - AnswerId(PK), QuestionID(FK), AnswerText, IsCorrectFlag, etc.
This will also allow you to support questions that have multiple answers.
I don't think you'll run into performance issues with the setup that you
described (at least not with this database - other things on the machine
might affect it). SQL Server is designed to handle a lot more than a few
thousand rows.
HTH,
Bob
-----Original Message-----
From: Pooh Bear [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 21, 2001 12:15 PM
To: CF-Talk
Subject: Database Design Question
hey yall, I'm workin on this project where you can get answers to a certain
exam (like if you're a teacher or instructor, u can use it to show to your
students). All of the answers are multiple choices. Each exam has anywhere
between 25 and 70 questions. I want to know the best way to store the
answers. Currently I am approaching it with 2 tables. The first table has
info about the exam (name, date, subject, etc) the second table contains
the answers, and has the ExamID next to it (one row equals one answer). I
was thinking that by doing that, I will get too many rows. like what if
there are 500 exams. 25 times 500 is a lot of rows! i am concerned about
the speed. Is there a way to store the answers? or is the DB good enough
to handle that much stuff? i'm using SQL server 7.0, the box has 512mb and
900mhz processor (it's a dev box also). thank you! :)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists