Implementing of tables and relationships

Jonny

Registered User.
Local time
Today, 11:07
Joined
Aug 12, 2005
Messages
144
Guys, need your kind help to implementing tables and relationships of a shown logic, where horizontal selections generate vertical questions.
 

Attachments

  • Capture.JPG
    Capture.JPG
    31.3 KB · Views: 180
I don't get it. You have x's at intersections, suggesting a value of True which implies (for example) that the country of origin in some cases is Truck.
EDIT - OK, does that mean if someone selects Truck you want a 'country of origin' question/prompt?
 
I will try better to explain, sorry for mess.
User may enter car category or color or fuel type or all of them together..
This will generate a questions.
For instance :
1. User selected fuel type = 93 octane ==> was generated a question of "trunk volume"
2. User selected color = black ==> was generated a question of "manufacturing date" and "trunk volume"
3. User selected color color = white and car category = trunk => was generated a question of "manufacturing date" and "country of origin"

Don't try to understand the logic, the original data was replaced by this example.
in general need to be able to generate a question by :
- car category , regardless color and fuel type
- color , regardless car category and fuel type
- fuel type , regardless car category and color
 
so the checkboxes actually indicate which question(s) should be generated based on what the user selects (ur 3 fields on "grouped" date), right?


this is a tough one. just by first looking at it, why not do it in excel? if my question above is correct, why not this?
Code:
table 1 > field 1 (id, autonumber, primary key), field 2 (selection, text)

table 2 > field 1 (id, autonumber, primiary key), 
field 2 (selectionID, long integer, foreign key), field 3 (question, text)
 
Jonny,

Please give readers a few examples to work with.
Take a specific topic/X or whatever and show us typical result.
 
Here's what I see:

Attributes
attr_ID, attr_Type, attr_Value
1, Category, Truck
2, Category, SUV
5, Color, Black
6, Color, White

Questions
q_ID, q_Text
1, Country Of Origin?
2, Manufacturing Date?
3, Trunk Volume?

AttributeQuestions
aq_ID, ID_Attribute, ID_Question
1, 1, 1
2, 2, 1
3, 2, 3
4, 5, 2
5, 5, 3
6, 6, 3
 
so the checkboxes actually indicate which question(s) should be generated based on what the user selects (ur 3 fields on "grouped" date), right?


this is a tough one. just by first looking at it, why not do it in excel? if my question above is correct, why not this?
Code:
table 1 > field 1 (id, autonumber, primary key), field 2 (selection, text)

table 2 > field 1 (id, autonumber, primiary key), 
field 2 (selectionID, long integer, foreign key), field 3 (question, text)
Correct, checkboxes indicate which question(s) should be generated based on what the user selects.
What would be the table names , what would be the values within those tables , how the tables would be linked?
 
Last edited:
Here's what I see:

Attributes
attr_ID, attr_Type, attr_Value
1, Category, Truck
2, Category, SUV
5, Color, Black
6, Color, White

Questions
q_ID, q_Text
1, Country Of Origin?
2, Manufacturing Date?
3, Trunk Volume?

AttributeQuestions
aq_ID, ID_Attribute, ID_Question
1, 1, 1
2, 2, 1
3, 2, 3
4, 5, 2
5, 5, 3
6, 6, 3

Thank you, plog! I will try this out!
 
Last edited:
As you have a "Based on Answer to Question A, Ask question B" situation, will you be saving the 2nd level answers in one record (differing fields), one table, or multiple tables depending on what is answered for Question A?

Using your data, if someone chooses "Truck" will you be saving "Country of Origin" in the same record where "Truck" is stored, saving it in a "Properties of Trucks" child, or in a "CountryOfOrigin" child instead of the "ManufacturingDate" child?

Knowing how you plan to store (and use) the answers to these secondary questions will help in defining what tables you need and how they need be related.
 

Users who are viewing this thread

Back
Top Bottom