ACC: Sample Table Design to Support Questionnaire Applications

ID: Q101675


The information in this article applies to:


SUMMARY

Novice: Requires knowledge of the user interface on single- user computers.

This article describes a table design that you can use for an application that tallies results from questionnaires and surveys.


MORE INFORMATION

The following examples outline nonrelational table design commonly used for questionnaires and surveys and suggests an improved, relational table design.

Nonrelational Table Design

When designing tables for questionnaire applications, many users begin with a design that resembles the table below. Each record contains multiple fields, called Question1 through Question<n>, that contain responses to the questions.

   Table: Table1 (old)
   --------------------------------------
   FieldName: Respondent ID [Primary Key]
   FieldName: Question1
   FieldName: Question2
   FieldName: Question3
   .
   .
   .
   FieldName: Question<n> 

Problems occur when you want to perform crosstab queries to summarize and/or graph the questionnaire results.

Relational Table Design

A relational table design better supports summary queries, reports, and graphs. In the table below, the Question ID field identifies the question and the Response field contains the answer.

   Table: Table2 (new)
   ----------------------------------
   Field: Respondent ID [Primary Key]
   Field: Question ID   [Primary Key]
   Field: Response 

How to Switch to Relational Database Design

To convert data that has been entered in Table1 format, follow these steps:
  1. Create Table2 according to the above structure, using the following data type criteria:



  2. Create a new query based on Table1.


  3. From the Query menu, choose Append Query (Append in versions 7.0 and earlier) Select Table2 as the table to which you want to append the data. Design the query as follows:
    
          Query: Query1
          ---------------------------
          Field: Respondent ID
             Append To: Respondent ID
          Field: Question1
             Append To: Response
          Field: "Question1"
             Append To: Question ID 


  4. Run Query1 to append to Table2 each participant's responses to Question1.


  5. Repeat steps 2-4 above, replacing Question1 with Question2, and "Question1" with "Question2". You must re-create or modify this query for each question in Table1.


  6. After running all the append queries, the result is a table (Table2) that can easily summarize your results in a crosstab query:
    
          Query: CrossTabExample
          ---------------------------
    
          Field: Question ID
             Total: Group By
             Crosstab: Row Heading
          Field: Response
             Total: Group By
             Crosstab: Column Heading
          Field: Response
             Total: Count
             Crosstab: Value 



REFERENCES

For more information about append queries, search the Help Index for "append queries," or ask the Microsoft Access 97 Office Assistant.

Additional query words: cross tab append questionnaire flat file survey


Keywords          : kbusage TblDsign 
Version           : 1.0 1.1 2.0 7.0 97
Platform          : WINDOWS 
Issue type        : kbinfo 

Last Reviewed: March 25, 1999