Answer the question
In order to leave comments, you need to log in
How to store a list of strings in a single field in a database?
In the database, there is a table of entities whose primary key is a string (Table No. 1). There is also a table (Table No. 2) that stores entities that must be associated with some entities from Table No. 1.
It is enough for entities from Table No. 2 to have a list of primary keys from Table No. 1, the number of keys can vary within different limits.
At the moment, there are about 12 million records in Table No. 2.
What you don't want:
Answer the question
In order to leave comments, you need to log in
It would be more correct to make a 3rd table linking the identifiers of the first 2 tables than to fence some text or json field with many identifiers in the SQL database.
The condition is not entirely clear.
What I don't want:what was meant by this and why exactly did not want to. Moreover, judging by the description, a many-to-many relationship is required, judging by
Create a many-to-many relationship
It is enough for entities from Table No. 2 to have a list of primary keys from Table No. 1, the number of keys can vary within different limits.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question