I need help on ideas on storing info to a database

Results 1 to 2 of 2

Thread: I need help on ideas on storing info to a database

  1. #1
    Join Date
    Dec 1969

    Default I need help on ideas on storing info to a database

    I have a form with checkboxes ie.<BR><BR>1. How did you learn about our company<BR><BR>checkbox1 newspaper<BR>checkbox2 internet<BR>checkbox3 word of mouth<BR>checkbox4 other<BR><BR>2. enter in address - textbox to enter in address<BR>3. enter in zip - textbox to enter in zip<BR><BR><BR> i want to store the data in a database. I want to know how to approach this and store the info. I want to know how can i store the info "HOw did you learn about our company" and then list what the user checked, ie word of mouth, other, etc ... I dont know how to design the database to hold the data.<BR><BR>Would this be right.<BR><BR>table user - pk userId, userFirstname, userLastname<BR>table data - fk userId, sectionName, values

  2. #2
    Join Date
    Dec 1969

    Default There are dozens upon dozens of...

    ...different ways of doing this and it all depends on what you&#039;re trying to do with the data later and whether you&#039;re trying to optimize for speed or size of the database and whether you want to keep it simple or go complicated.<BR><BR>The database design you suggest can work well. I&#039;m not sure where the first and last names suddenly came from, but I assume that you have a group of people who may fill in one or more forms, so you don&#039;t want to repeat their details with every form.<BR><BR>Another option, which is more geared to small size of database, may be to translate each question and answer in your form to the relevant data fields. Every question would be a text field and in the case of check boxes the answers would be yes/no fields (that&#039;s in MS Access). In your example you would have:<BR><BR>Table Data:<BR><BR>userId (FK)<BR>Question1 (text)<BR>Answer1 (yes/no)<BR>Address (memo)<BR>ZIP (text)<BR><BR>I suggest you learn a bit more about databases before you go much further with this project. If you&#039;re not familiar with how databases work, you&#039;ll quickly struggle to progress.<BR><BR>Oliver.

Posting Permissions

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