Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Jul 2006
    Posts
    110
    Thanks
    1
    Thanked 0 Times in 0 Posts

    database structure advice

    Hi everyone -

    I'm new with databases, and I would appreciate some feedback on something...

    If you would build a database that would hold surveys about, say, a teacher or professor, what kind of tables would you use?

    I'm thinking that I'd have a table with all the teachers with all their specific information (ID number, first name, last name, subject, email address, etc.).

    Then I'd have another empty "responses" table that a place for the teacher's ID number, and spaces for all the questions (which will be a combination of numbers 1-5 and text areas for comments.)

    Users could select the teacher from a dropdown and then fill in the form - which would be submitted to the responses table.

    Any thoughts?
    I understand this is such a novice question, but I'd really like to know if my thought process is correct...

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    You should do some reading on the web about database normalization. Here are a few articles that can help you:

    http://en.wikipedia.org/wiki/Database_normalization

    http://www.databasejournal.com/sqlet...le.php/1428511

    http://databases.about.com/od/specif...malization.htm

    http://dev.mysql.com/tech-resources/...alization.html

    I can tell you specifically your plan to store all questions in one row is not normalized. You would want to store one question per row, with a foreign key back to a survey ID, or something along those lines.

  • #3
    Regular Coder
    Join Date
    Jul 2006
    Posts
    110
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks, Fumigator.... these links will be very helpful.


  •  

    Posting Permissions

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