How to Properly Organize Tables in a System

Asked

Viewed 30 times

0

I am developing a system for a school where the teacher will create the proof by the system, I have 3 entities: Proof, Question, Alternative, I would like to know the best way (in the database) to save the correct alternative? Ex: in which table would be the answer: Question or Alternative, I would like to make the relationship appropriately.

  • 1

    You have already planned which attributes will have each Entity?

  • Yes, but in a very basic way, the attributes will be Proof -Title Questao -Statement -Prova_id Alternative -Alternative -Questao_id

  • It would have a "leg" of the student , ie the answers , as modeled ?

  • This is just for the teacher who’s creating the test, when it’s over, to have a way of knowing what the right questions are

  • The other part of the modeling could help in simpler sqls. The idea that occurs to me would be a column in Alternative of type CORRECT S or N , would have to have a validation to ensure only one correct answer , the simpkes solution a column in Questao.

  • it seems to me an interesting approach, I will see how to do, thank you! anything I communicate here!

Show 1 more comment

1 answer

1


As I would create;

1 - Proof (Codprova, Data, Materia, Pontos) 2 - Proof (Codquestao, Codprova, Text) 3 - Provaquestaoalternativa (Codalternativa,Codquestao,Text,Alternativacorreta(Yes or No))

Something to that effect.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.