数据库结构
我正在建立一个与赌博相关的网站,人们可以在其中观看足球比赛(比赛)。 一场比赛的结果是:主胜-平局-客胜。我有一张用于球队的桌子,一张用于固定赛程的桌子,另一张用于投注的桌子。赛程表有主队和客队。但如何为平局下注建模呢?让投注表参考赛程和球队很容易。但平局?
I'm building a gambling-related website where people can be on soccer fixtures (matches).
A fixture ends up with a result: home win - draw - away win. I have one table for teams and one table for fixtures and another for bets. The fixtures table has a home team and an away team. But how do I model a draw bet? It's easy to have the bet table refer to the fixture and refer to the team. But a draw?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最基本的系统:
3 张桌子,一张用于球队,一张用于赛程,一张用于投注。结果表示为:
0 =>平局,1 =>主队获胜,2 =>客场获胜
球队:
赛程:
投注:
The most basic system:
3 tables, one for teams, one for fixtures and one for bets. Outcomes are represented by:
0 => Draw, 1 => Home win, 2 => Away win
Teams:
Fixtures:
Bets: