RE: Database Design
From: MeanOldDBA (MeanOldDBA_at_discussions.microsoft.com)
Date: 09/15/04
- Next message: Jacco Schalkwijk: "Re: Using OPENROWSET and fileds order..."
- Previous message: Gert E.R. Drapers: "Re: MSDTC"
- In reply to: Givosky: "Database Design"
- Next in thread: Givosky: "RE: Database Design"
- Reply: Givosky: "RE: Database Design"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 15 Sep 2004 02:45:03 -0700
There are a lot of possible answers to this question. It really depends on
what your business needs are. I would assume you're going to want to change
the survey often, so you might want to consider something like this:
Question
======
QuestionKey
Question
BeginDate
EndDate
Answer (You might actually want to have several of these, depending on
complexity)
=====
AnswerKey
Answer
BeginDate
EndDate
QuestionAnswerMatrix (Match available answers where needed.)==============
QuestionKey
AnswerKey (AnswerKey could be blank for free text answers if you have those.)
BeginDate
EndDate
User
====
UserKey
UserName
etc, etc, etc
UserAnswers
=========
UserKey
QuestionAnswerKey
SurveyDate
This should at least give you some ideas. The most important thing in
database design is making sure the design is strong, normalized and yet meets
the needs of the business. If you haven't even asked the questions, there's
no way to design well. Based on the design above though, you should be able
to create stored procedures that easily report on and modify the data for the
surveys, as well as track historical survey "template" changes.
"Givosky" wrote:
> Hi,
>
> I'm a newbie, how do i created a table for the survey data.
>
> Given the questions for each user:
>
> Do you Smoke ? Answer Yes
> If Yes, How many times Answer 3
> Do you take alcohol? Answer No
>
> How will i create a table for this.
>
> Do i do like this
>
> UserName Do_You_Smoke How_Many_Times Alchohol
> User1 yes 3 No
>
> I want to create a report from this survey and Pull up the data for each
> user on the form again for modification
>
> Please Help
- Next message: Jacco Schalkwijk: "Re: Using OPENROWSET and fileds order..."
- Previous message: Gert E.R. Drapers: "Re: MSDTC"
- In reply to: Givosky: "Database Design"
- Next in thread: Givosky: "RE: Database Design"
- Reply: Givosky: "RE: Database Design"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|