Answer the question
In order to leave comments, you need to log in
Is it possible to improve the structure of the database?
Help improve the structure of the database. The players organize a tournament with an equal but arbitrary number of teams. The tournament grid consists of rounds equal to the number of teams. In each round, the players play each other with the n-th team. Statistics are kept on players: number of games, points, etc. At the moment, the database looks like shown in the attached file, and I think this is not the best option. Help me please.
PS In the "CompetitionStatistics" table, instead of PlayerOne and PlayerTwo, OwnerPlayer and VisitorPlayer would probably be more clear.
Answer the question
In order to leave comments, you need to log in
Player:
team = FK(Team)
...
Team:
...
Competition:
...
CompetitionTour:
competition = FK(Competition)
owner = FK(Team)
visitor = FK(Team)
// правильнее (с точки зрения НФ), получать результат,
// как сумму результатов игроков обеих комманд
// но если не напортачить с обработкой, то больших проблем быть не должно
owner_result
visitor_result
CompetitionTourPlayerStats:
competition_tour = FK(CompetitionTour)
player = FK(Player)
result
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question