Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2005-10-19 : 05:36:52
|
| Peng writes "There probably is not the right answer to this question. I am building a web-based application that will let users edit different types of questions for each content section. To do this I have these tables: tQuestionEntries { EntryID, QuestionID, QuestionType, OrderNum, SectionID}tMultipleChoiceQs { QuestionID, QuestionText, CorrectFeedBack, WrongFeedback, Value}tMCOptions { OptionID, OptionText, Feedback, iskey}tFillBlankQs { QuestionID, QuestionText, CorrectFeedback, WrongFeedback, Value}tFBKeys { KeyID, KeyText}When I want to list questions for a particular section, I do 'SELECT QuestionID, QuestionType FROM tQuestionEntries WHERE SectionID = xxx ORDER BY OrderNum ASC', and then depending on the QuestionID and QuestionType in the recordset, I then go to either tMultipleChoiceQs or tFillBlankQs table to get information about each question and write out in HTML. My question is that: is there a better way to design the tables for this problem? how would a database expert design the tables and relationships for this problem? Currently, I don't know of a way to use a single complex query to pull out all the information with this design. Is this possible with any design? Thank you DB expertsPeng Zhangpzhang66@yahoo.ca" |
|
|
|
|
|
|
|