I have table,
Table Book
id,name,buyers
And each row has the list of buyers.
buyers are about 100000.
So now I have two ideas.
First one is
Push the array of 100000 elements in row
id, name, buyers
1, nice story,[1042,13534,14534,15353,,,,,.....]
Second one is
Make another table
Table Buyers
buyer_id, book_id
1042 , 1
13534 , 1
14534 , 1
15353 , 1
I guess total database size is small for Idea 1 but it’s not good way to handle such a big array ?
Which one is faster and best practice?
1