I'm new to this site and know a little bit of MySQL from a syntax standpoint, but am still fairly new when it comes to structure.
Need some help here. I'm building a survey which has approximately 30 questions. I'm expecting about 1,000 responses to this survey.
One way to build the tables is to build a user table ... then build a responses table where it looks like this.
Users
userid
name
Responses
questionid
userid
response
Only problem with this method is that I'm looking at a table that is 30,000 rows long. Would it better to create do it this way?
Responses
userid
question1
question2
question3
...
question20
This table would be about 1,000 rows long (and easier for me to extract the data into an Excel sheet for reporting purposes since I won't need code to join all the data), but it would about 30 columns wide.
What is the best way to build a table? Build it horizontally (i.e 30,000 rows by 4 columns) or vertically (1,000 rows by 30 columns)?
Need some help here. I'm building a survey which has approximately 30 questions. I'm expecting about 1,000 responses to this survey.
One way to build the tables is to build a user table ... then build a responses table where it looks like this.
Users
userid
name
Responses
questionid
userid
response
Only problem with this method is that I'm looking at a table that is 30,000 rows long. Would it better to create do it this way?
Responses
userid
question1
question2
question3
...
question20
This table would be about 1,000 rows long (and easier for me to extract the data into an Excel sheet for reporting purposes since I won't need code to join all the data), but it would about 30 columns wide.
What is the best way to build a table? Build it horizontally (i.e 30,000 rows by 4 columns) or vertically (1,000 rows by 30 columns)?
Comment