Answer the question
In order to leave comments, you need to log in
How to make a custom table constructor?
Hello everyone, the theoretical part of the question torments me and my curiosity ... I stumbled upon this in Bitrix24 CRM, so I will describe it using its example.
We have, for example, a sign "customers". clients have fields "phone", "name", "mail". The service itself runs in the cloud. And for each company there is an opportunity to customize the table, i.e. user 1 can add an "address" field, user 25 can add a "source" field, and so on. Moreover, a data type can be selected for the field.
As a matter of fact, I was interested in how it would be correct to implement this in the database?
The option comes to mind with "saw a table with the fields "owner_id", "field_name", "value". But in this case, there is no way to set the data type, and from the point of view of making selections on this data, there will be a very big trouble in performance.
Another option is to use JSONP for these purposes, this will solve the typing problem, but leave the problem with the lack of indexes, and the complexity of the selection.In general, I think there is a beautiful concise option that I don’t know about :)
Please tell me what would be most correct implementation?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question