【发布时间】:2011-03-27 19:13:19
【问题描述】:
我已经开始写杯子树了,现在可以了。
我现在想问一下对于比赛来说什么是好的数据库结构。
我是这样想的:
table participant
--------------
id of player
id of cup
table round
-----------
id of cup
id of player
number round
table cup matches
-----------------
id match
id of cup
id of playerA
id of playerB
number resultA
number resultB
这是一个好的设计吗?
工作流程:
第一轮:所有参与者都加入。生成第一轮比赛。
玩家 A 输入结果(他赢了)。玩家 B 接受。因为比赛被接受,所以进入一轮。 PlayerA现在进入下一轮。
输入最后一个匹配项后,将生成下一个匹配项。
有更好的想法吗?
【问题讨论】: