【发布时间】:2012-10-05 10:30:47
【问题描述】:
我正在尝试在数据库中建模体育比赛..
我有以下表格
[sport_game]
sport_game_id
sport_game_type_id
name
description
[sport_game_instance]
sport_game_instance_id
sport_game_id
start_time
end_time
[sport_game] 1 - M [sport_game_instance]
[sport_game_type]
sport_game_type_id
type -- professional, semi-pro, college..etc
[sport_game] M - 1 [sport_game_type]
[basketball]
basketball_id
sport_game_typeid
basketball_info
[basketball] 1 - 1 [sport_game_type]
[baseball]
baseball_id
sport_game_type_id
baseball_info
[baseball] 1 - 1 [sport_game_type]
我不能 100% 确定是否将类型表与特定运动相关联;我有时认为它有效,但不确定。
我希望它能够拥有一组具有通用信息的核心类,例如 [sport_game]、[sport_game_instance]。
带有[运动游戏类型],我可以修改和添加更多运动;它是我不确定的单独表格。我在想把它们分开意味着任何与运动相关的东西,如果我需要的话,我可以加入这些表格。
你怎么看?
【问题讨论】:
-
您在 [sport-game] 表中的条目肯定是棒球、篮球等。如果您能给出您期望在表中出现的值的示例,将会有所帮助。