Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2015
    Posts
    1

    Unanswered: Questions and Answers Database - Best practice/More optimal

    Hi guys and gals,
    I have some sample Questions and Answers stored in a Database called Questionnaire. It has 2 tables, Questions and Answers.
    The issue I'm having is that when I join the Questions and Answers tables, the question data is repeated for each possible answer for that question.
    So I think the problem is that I've structured it poorly, there is a foreign key from A.QuestionID to Q.QuestionID.
    If anyone else has designed a similar database, how did you do it?

    Cheers,
    Brendan

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Please provide a script to create some sample questions, some sample answers, the query that you are actually using now, and the results that you'd like to obtain. The sample data doesn't need to be large, three questions with three answers each ought to be plenty.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •