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  dBforums > General > Database Concepts & Design > Suggestion on Question table design

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-05-07, 00:18
kmf165 kmf165 is offline
Registered User
 
Join Date: Sep 2007
Posts: 9
Red face Suggestion on Question table design

Hi all, I am new here. Would like to seek suggestions from experts here.

I have a system which will save a lot of sets of question. Different question will grouped as one set and assigned to a level (difficulty- there is 26 level). Is it good to have 26 tables of each level like tableQuestionLevel1, tableQuestionLevel2 .......tableQuestionLevel[n] in order to keep the question?
Or have two table. one is set master table which will store set id and level, and another table which is question data and referencing set id?

Thanks
Reply With Quote
  #2 (permalink)  
Old 09-05-07, 02:03
sco08y sco08y is offline
Registered User
 
Join Date: Oct 2002
Location: Baghdad, Iraq
Posts: 697
Quote:
Originally Posted by kmf165
Hi all, I am new here. Would like to seek suggestions from experts here.

I have a system which will save a lot of sets of question. Different question will grouped as one set and assigned to a level (difficulty- there is 26 level). Is it good to have 26 tables of each level like tableQuestionLevel1, tableQuestionLevel2 .......tableQuestionLevel[n] in order to keep the question?
Or have two table. one is set master table which will store set id and level, and another table which is question data and referencing set id?

Thanks
Well, what do you think is easier, creating and managing 26 tables or creating and managing 2?

There is a general rule in computer programming of any sort: if you're doing something ten times over, you've defeated the purpose of using a computer. You should always make the computer do it ten times over, if at all possible.
Reply With Quote
  #3 (permalink)  
Old 09-05-07, 02:38
kmf165 kmf165 is offline
Registered User
 
Join Date: Sep 2007
Posts: 9
Thanks for reply

Ya, I have done this actually. But when client saw it. they prefer that 26table method, which make me headache. I am trying to convince on 2 table actually.
Reply With Quote
  #4 (permalink)  
Old 09-05-07, 06:49
r937 r937 is offline
SQL Consultant
 
Join Date: Apr 2002
Location: Toronto, Canada
Posts: 19,524
Quote:
Originally Posted by kmf165
But when client saw it. they prefer that 26table method, which make me headache.
fire the client
__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book
Reply With Quote
  #5 (permalink)  
Old 09-05-07, 10:20
TravisJ TravisJ is offline
Registered User
 
Join Date: Aug 2007
Posts: 10
Quote:
Originally Posted by kmf165
Ya, I have done this actually. But when client saw it. they prefer that 26table method, which make me headache. I am trying to convince on 2 table actually.
Ask them what will happen if they decide to have 28 levels instead of 26? They will have to create two new tables, whereas with the two table design, you don't have to modify the database design at all. Your two table method is more "scalable"

Better, unless you are required to do so, never show a non-technically proficient client different possibilities that they aren't qualified to choose between.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On