View Full Version : database structure advice

02-14-2007, 03:40 AM
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...

02-14-2007, 04:18 AM
You should do some reading on the web about database normalization. Here are a few articles that can help you:





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.

02-14-2007, 04:27 AM
Thanks, Fumigator.... these links will be very helpful.