1
1
1programmer2018-12-11 20:18:54
PostgreSQL
1programmer, 2018-12-11 20:18:54

How to design a database and send multiple responses at once?

Hi all. You need to write a test.
50 questions, they have 3 identical answers (Yes, no, I find it difficult to answer)
Base - postgres
Server - node js
Did I understand correctly database:
table question: id | question
table variant : id | variant
table user_answer: id | username | variant.id | question.id
Did I make the base correctly? How can I send 50 answers at once, in the postman I can only specify like this
{
"user_id": "4",
"question_id": "1",
"variant_id": "2"
}
Well, I can duplicate "question_id" several times
What am I doing it wrong?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question