Hello all..
Im designing a database to store system problem troubleshooting (like a flow chart).
Basically there is a SYSTEMS and PROBLEMS table and a SYSTEMS_PROBLEMS linking table (many system can have many problems).
Each "problem" starts with a question, which can either go to an answer or to another question. My problem is how to store the info of when a question goes to 2 questions (Q3 below)
Each problem can have several questions in it. PROBLEM_QA stores their relationship to each other, so if a question goes to 2 more questions - those questions are stored in Next_Question1_ID and Next_Question2_ID ( Answer_ID would be empty).
Likewise Next_Question2_ID would be empty if a question went to another question and an answer.
Q1 → A1
↓
Q2 → Q3 → Q4 → A2
↓ ← ↓ ← ↓
↓
Q5 → Q6 → A3
↓ ← ↓
↓
A4
These are my tables
SYSTEMS
System_ID (pk)
Description
PROBLEMS
Problem_ID (pk)
Description
SYSTEMS_PROBLEMS
System_ID (pk)
Problem_ID (pk)
PROBLEM_QA
Problem_ID (pk)
Question_ID (pk)
Answer_ID
Next_Question1_ID
Next_Question2_ID
QUESTION
QuestionID (pk)
Question
ANSWER
AnswerID (pk)
Answer
This appears to work ok as it is, but im not too happy with the PROBLEM_QA table, as a lot of fields will be left blank, any suggestions on how it could be stored differently? Could it be normalizeed further?
Thanks in advance