MySQL, which method is more efficient? MN or save all related identifiers as a string?

I am developing MySQL DB for a vocabulary exam.

Table: users, words,results

The participant selects all the words that he knows about the meaning. All exams are different from each other, that is, the exam is arbitrarily created from the database. This is a 350 word for each exam.

Now I want to save the result for each exam plus all the words that the participant has chosen. As you can see, for each exam for each exam there are many ids(words)! I have two ways:

1- Multiple ratio in the table result_word(no more than 350 lines for each exam):

result_id | word_id   
--------------------
    1     |  33
    1     |  12
    .     |   .
    .     |   .

2- Like a row in a column answered_idsin a table results:

    id    | answered_ids   
-------------------------
    1     |  "12,33,..."

1: answered_ids: "33,12,..."

, , explode() php!

, , . ? ?

UPDATE:

English words words ! , , , ! , actual words fake_words, 50 , 3 , . , .

VueJs2. , . , , , !

: , ? 5000, . , .

+4
1

, MySQL, . . , 1.

  • , PHP.
  • , word_id, .
  • SQL-, , , .., PHP- .

, , , , JOIN. , Luke, .

+2

Source: https://habr.com/ru/post/1681548/


All Articles