0

I Know this is probably not a typical question for SO, but I have to ask. I have a scenario where many users can create many tests, that have answers from many test-takers. The tests can contain as many questions as the user desires.

I understand that in a perfect world each test would have it's own related table for answers. My question is (since I've never ran across anything like this), won't this create a database maintenance nightmare of clutter with hundreds of tables? Is there a better way that I'm missing?

MichaelM
  • 3
  • 1
  • There's no reason to have a different set of tables for each test. The test ID should be a column in the table. – Barmar Nov 12 '13 at 11:30
  • Thanks for the direction, I have a test_questions table, with the related testID, if I have a test_answers table with test_questionsID, which is fine, won't this run into performance issues when that table starts containing several thousand (or hundred thousand) answers? – MichaelM Nov 12 '13 at 12:10
  • Database tables often have millions of rows, that's what they're designed for. Make sure you have indexes on the columns used in joins. – Barmar Nov 12 '13 at 12:11

0 Answers0