mysql - 赛马数据库;如何以正确的方式做到这一点?
问题描述
我正在建立一个赛马数据库。每个比赛结果都有(至少)以下参数:
- 种族名称
- 比赛日期(我想将这两个作为特定条目的 ID)
- 赛道
- 距离
- 地下
- 去
- 种族类型
- 赛车纪律
- 参赛年龄
然后是马匹、骑师和训练师以及他们取得的位置。像这样:
- 地方:
- 马名
- 陛下
- 坝
- 所有者
- 教练员
- 骑师
- 重量
- 官方评级
- 其他评级
- 重量
- 赔率
- 画
- 其他的东西。
- 地方 (...)
- 等等。
由于世界上有很多比赛,我正在努力为数据库创建一个结构,将比赛和结果联系起来,并能够搜索特定马匹的结果。
我将非常感谢提示如何根据马匹的结果和具体参数来排序比赛的参数。
解决方案
我建议如下:
1 Table for the race places (PlaceId, Name, Address etc)
2 Table for the horses (HorseId, Name, Owner, Age etc)
3 Table for the Jockeys (JockeyId, Name, Company, Age etc)
4 Table for the Races (RaceId, Link to PlaceId, Name, Date etc)
5 Table for the Attendees (Link to RaceId, Link to HorseId, Link to JockeyId, Ranking)
推荐阅读
- python - 即使数据正确,Highchart x 轴也会随机洗牌
- java - 如何找出 Eclipse 项目中使用了哪些版本的 JAR
- javascript - 在 guildCreate discord.js 上创建频道
- spring-boot - 使用 'application/json',给定 [*/*] 并支持 [application/json]
- python - 使用 pip 在新环境中添加新库时出错
- android - 删除 View.ListView 中的最后一个分隔符(F# Fabulous)
- three.js - threejs v115,line20969:模具不工作
- python - 如何在 Python 中透视大数据
- kubernetes - 容器卡在 Kubernetes 中创建
- java - 设置 Spark 中的节点数限制