Answer the question
In order to leave comments, you need to log in
Serialized array vs 25 columns in a table?
Tell me please.
There are 25 entity properties (always 25 but may have different values). What would be better from the database point of view, to create 25 fields or one field in which to store the serialized array?
The data will be needed often, in addition, I will be used in case of a misspelling as well.
Advise, there is no strong experience in design in this regard.
Answer the question
In order to leave comments, you need to log in
Each field in a separate column during the selection will work much faster, especially if you also build indexes on the selected fields.
If indexes are not needed, then you can use the JSON field type, then you can even make a selection by a specific property, and if necessary, it's easy to add a few more properties without creating additional fields.
Each property is a separate column.
This will allow you to select only the properties you need, if everything is not needed and search by properties.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question