Answer the question
In order to leave comments, you need to log in
What will be more logical, serialization or in the new table?
There are for example categories for ads.
Where is the best place to store them? In a separate table, or in a table with declarations, but serialize? In Bitrix, for example, all such properties are serialized.
Answer the question
In order to leave comments, you need to log in
Bitrix is the bottom of technology. you can ignore the assurances of the sectarians, do not enter into dialogues.
whoever deletes my answer will be boiled alive in Bitrix
In the new one. Bitrix is not a standard at all. To confuse you, I will leave the link www.getinfo.ru/article610.html
in a separate table it's easier to maintain
Category table
advert_category
id mpath parent_id name
*** I prefer to store the nesting of categories/comments as Materialized Path + parent-child
We need to store the ad in several categories create a table (this rule works for everything that needs to be stored many to one or to many - an intermediate table via pivot, etc.)
advert_category_pivot
id advert_id category_id
PS do not use data serialization to search for such data is very difficult and it will work without indexes.
If you really need to save the array in the database, then only JSON mysql 5.6 or 5.7 can work and index json. But in new versions there is a regression with performance
Yes, and tie with Bitrix, we do not advise bad)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question