Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Build table
Message
From
29/05/2005 19:27:59
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
 
 
To
29/05/2005 06:03:33
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Environment versions
Visual FoxPro:
VFP 8
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01018434
Message ID:
01018458
Views:
10
>hi all,
>what is the best way
> to create a table have fields with data as under
>ex..
>
>q1. what is your contract type
>
> 1.personal offers/prepaid card     3.companies offers/prepaid card
>
> 2.personal offers/postpaid card    4.companies offers/postpaid card
>
>q2. based on your past exprince with tel.company how you judge the following?
>                             good   fair    poor
>                             ----   ----    ----
>  1. price                     1      2       3
>  2. service quality           1      2       3
>  3. after sales services      1      2       3
>  4. billing                   1      2       3
>
>
>
>thanks

q1 might be a single field, either character or numeric (1 byte), to store the four options, coded with the same numbers you showed, that is, 1-4.

In q2, each of the four parts might be a separate field, also 1 byte.

If you think that in the future you might expand to more questions, or in general, to accomodate a variable number of questions, it might be better to have a separate table, with the following fields:

First, in the main table, you would have to add a primary key, with a unique value for each person included in the survey.

In the secondary table, you would need a link (foreign key) to main table. Additional fields would be the question type (coded in a separate table, which lists the different questions), and the value stored for each, i.e., the reply.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform