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?

5
  • 3
    Why would you want to do this? Jan 10 '19 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 '19 at 13:02
  • Other are optional Jan 10 '19 at 13:26
  • 1
    You have to look at the EAV model.
    – Kondybas
    Jan 10 '19 at 14:33
  • 1
    Study Limits on Table Column Count and Row Size.
    – Akina
    Jan 11 '19 at 4:57
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.