0

I have a form of more than 3000 fields and i want to create a table without splitting it into two.

Is it okay? Or it will have problems?

closed as off-topic by mustaccio, Michael Green, Mr.Brownstone, Colin 't Hart, Andriy M Jan 13 at 22:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Too localized - this could be because your code has a typo, basic error, or is not relevant to most of our audience. Consider revising your question so that it appeals to a broader audience. As it stands, the question is unlikely to help other users (regarding typo questions, see this meta question for background)." – mustaccio, Michael Green, Mr.Brownstone, Colin 't Hart, Andriy M
If this question can be reworded to fit the rules in the help center, please edit the question.

  • 3
    Why would you want to do this? – George.Palacios Jan 10 at 12:20
  • 2
    Nobody is going to want to fill out a form with more than 3000 fields. It may be time to step back and see if there is another way to accomplish what you are trying to do without having a form with that many fields. – Dave Jan 10 at 13:02
  • Other are optional – Achoda james Jan 10 at 13:26
  • 1
    You have to look at the EAV model. – Kondybas Jan 10 at 14:33
  • 1
1

3000 optional fields today; 3001 tomorrow. You are looking at all-to-frequent ALTER TABLE .. ADD COLUMN..

Keep the "common" columns as MySQL columns. Put the rest into a JSON string. Be aware that it is messy and inefficient to filter or sort on data buried inside a json string.

The EAV schema pattern has, in my opinion, worse drawbacks.

Not the answer you're looking for? Browse other questions tagged or ask your own question.