Relational Model of a Bank

Asked

Viewed 70 times

0

The question is this, I have the following situation:

inserir a descrição da imagem aqui

On the right side I have the mathematical knowledge - MK and on the other side Conhec. Didactic - PCK, let’s call them Domain, and in each of them, divided in the middle of the hexagon, I have three other types of knowledge, let’s call them Subdomain. The situation I have to solve is, for each subdomain I have to add situations, and each situation has several issues with different alternatives, follows an example:

inserir a descrição da imagem aqui

Question 2 concerns the same situation as above.

inserir a descrição da imagem aqui

And the answers, or necessary feedback follows in this image:

inserir a descrição da imagem aqui

All this development I will do using the Django framework, but before I have to go through the creation of this relational model, anyway, this is what I’ve assembled so far:

inserir a descrição da imagem aqui

Since I am not a bank expert, I would like your suggestion on what I can adjust or add to the model or if everything is wrong, anyway. But basically it is, each domain can have up to 3 subdomains, or more, and each subdomain can have only one domain. Each subdomain may have several situations, but the situation can only have one subdomain. Each situation can have several questions, that is, for a situation I can have several questions that go one pointing to the other. And out of this every question can have n alternatives. These questions must be answered by a participant, in this case a system user. Thank you!

1 answer

0


Analyzing from the description provided, the model is largely already meeting your requirements, I believe your model is not yet complete, but still, I would like to signal some situations:

  • There is no relationship (and I don’t see the need to exist) between the tables Entrant and Situation, because in none of them is there an attribute that indicates relationship between them.
  • Check if there is really a need for two 'Ids' in the table Entrant, since both attributes of the table are integer, I think you can discard one of them.
  • On the table Participanteresposta you have put more foreign keys than necessary, in this table you just need to save the participant ID and the alternative ID chosen by him, because, having the alternative ID you can get all the other information you need from other tables.
  • The cardinalities between the relationship of the tables Participanteresposta and Alternative should look like this: Alternative (1,1) ------ (0,N) Participanteresposta, as an alternative may or may not be chosen as an answer by the participant, and the participant may only choose as an answer a single alternative.
  • From the images provided, I think there should also be a table Resolutive, because I see that every question has at least resolution A, B, C and D, so your relationship could be this way: Resolution (1,1) ------ (1, N) Alternative.
  • Spock, thank you very much for your help, I’ve already made some changes here and it’s been very valuable. But I did not understand very well the fourth point on the table Resolution, since the way you put it from what I saw is already like this: Question (1,1) ------ (1, N) Alternative

  • I get it, Spock. That table really was missing. Thanks a lot for your help, buddy.

  • I’m glad you understand, I didn’t notice I messed up the table names at the last point, I just corrected.

Browser other questions tagged

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