Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How many columns are allowed? 1

Status
Not open for further replies.

majorbroncosfan

Programmer
Feb 23, 2001
121
US
I am creating an online application for our current web page. We have over 129
questions or areas gather information for this document. I don't seem to have
any reason to spread any of this information over more than one table, since they
all pertain to the same subject. The problem is that there are 129 columns in
this huge table. Is this normal?
 
SQL can handle up to 1024 columns per base table but you might consider storing your questions in a table like this:
QuestionID
QuestionText
and your answers in a table like this:
AnswerID
QuestionID
AnswerText
 
Ah, I get it now. While there might be a better db design for this - it wouldn't be the one I suggested. I should just stick to the proposed questions... X-)
 
Hi majorbroncosfan,

Storing information in 129 columns is easy to update and retrieve. But what i think, that, no. of questions must not be the criteria while creating the table. Because, in near future you might want to add some more questions. Then, obviously you have to add more columns.
It is good to distribute information in different tables. So, if in future you want to add a few more questions you can add it easily.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top