Database Model (entry and registration to the system)

7

Evaluation for example is like a school subject, physical chemistry math.

Attempts for example are the exams given for each subject

I want to know the attempts of a user regarding an evaluation

The userid must be in the Attempt entity?

I attach the relational model

    
asked by hubman 25.03.2018 в 00:21
source

2 answers

10

What kind of relationship do we find here?

If each student can do the evaluation several times (attempts), then we have a 1 to N relationship between students and attempts.

Therefore, in that case the student_id goes in the attempts table.

Since there is no way for several students to make the same attempt (but if the same evaluation), then we can ensure the relationship 1 to N.

In that graph that you show, however, there are many relationships that are not understood.

It is assumed that an evaluation is unique, and is not related to any student. It could be related to a subject. Therefore, there are illogical relationships within what you show.

IMPORTANT NOTE

It is important to understand that the relationships in a database are given by the rules of the business. There is no one way to make relationships without knowing precisely the rules that business has. One can suppose how it should be, but without knowing if, for example, the student can make more than one attempt, it is impossible to know if the model is correct or not.

    
answered by 28.03.2018 / 03:22
source
4

The userid must be in the Attempt entity? My answer is yes.

A user has several attempts and each attempt belongs to a user . Likewise, every attempt belongs to an evaluation and evaluations can be tried several times.

  

[user] -1-N-> [attempt]

answered by 28.03.2018 в 08:26