I'm trying to model a bank for a simple game for World Cup games. Was it that way?
The idea is that the person can register and make guesses for each game by informing a winner or if they will have a draw.
Without knowing what you need to do in detail you can not tell if it's good or right. I can speculate on what is the least obvious about the domain addressed.
I do not know what the Partida_has_Selecao
table does, I think it's over there.
The Partida
table should have id
of the two selections, not the names. And the result should be divided into two columns with the score of each team. Unless you only need to know who the winner was or if there was a tie, a simple numerical value or enumeration with 3 states would suffice. I can not figure out why it needs to be VARCHAR(45)
.
In the Aposta
table I'd put Id
as the primary key, but it's my taste within my experience. I do not understand what the third column is for. And the guess pattern should follow the pattern of Partida
result. In%% of a boolean would suffice.
It can be more sophisticated, but it depends on what the application wants to do.