I posted this in both the Visual Basic and MS Sql Server forums.
I'm working with: VB6 and SqlServer 2000
I'm creating an application that requires users to answer several questions and based on answers to those questions, certain conditions result, such as the ability to view certain sections of the questionaire and/or more questions appear and/or some questions become irrelavent and/or mathematical formulas work one way or another based on an answer to a question.
Here is an example:
The user has to answer a question. For this particular question, if the user chooses Yes then I must "Activate" all of the questions that are flagged with the code X. If the user chooses No then I must "Activate" all of the questions that are flagged with Y and "Deactivate" all of the questions that are flagged with Z.
I'm coming across a design issue (both with the application itself and the database). What is the best way to store all of this in a database? Should I store the questions along with the list of possible answers and their corresponding conditions in the database as well as the actual data for each record (each questionaire)? Should I be referencing the database to populate all of my questions on my
VB form or should I manually put labels and combo boxes containing the questions and possible answers on my form? Or should I be using another technology to store my questions and conditions OR my results, such as XML?
I looking for suggestions. I want to optimize my program as much as possible. I don't want to slow it down by making several calls to the database, but I want to make sure I'm also taking away optimization by hardcoding everything.
Thanks for your time and help!