星型模式建模 - 多对多
当我学习这个范例时,我正在基于 NFL 统计数据构建一个数据仓库,用于教育目的 - 我有以下建模问题
球员可以在不同年份为不同球队效力,同样教练可以在职业生涯的不同年份执教不同球队;球员也可能在不同的年份扮演不同的位置(罕见但有可能)
对不同年份的球员、教练和球队之间的分配进行建模的最佳方法是什么?
我可以将不同年份的名单信息存储在一个维度中吗?例如,DimTeamRoster 将具有 TimeKey、TeamKey 和 CoachKey(因为一支球队只能有一名主教练),而 FactTeamRoster 则具有 TeamRosterKey、PlayerKey、Positionkey
或者我是否会拥有一个 FactTeamRoster,其中将具有 TimeKey、TeamKey、PlayerKey、PositionKey?但是这种方法是否有意义,因为这个事实表不会真正存储任何度量,它只是存储当年的作业
还有哪些其他可能的解决方案以及每种方法的优点/缺点/正确性?
I'm building a data warehouse based on NFL statistics for educational purposes as I learn this paradigm - I have the following modelling problem
Players can play for different teams different years and similarly coaches can coach different teams different years of their career; players could also potentially play different positions in different years too (rare but possible)
What is the best way to model the assignment between players, coaches and teams for different years?
Would I store the different years' roster information in a dimension? eg DimTeamRoster which would have a TimeKey, TeamKey and CoachKey (since a team can only have one Head Coach) with a FactTeamRoster with a TeamRosterKey, PlayerKey, Positionkey
Or would I have a FactTeamRoster which would have a TimeKey, TeamKey, PlayerKey, PositionKey? But then would this approach make sense because this fact-table wouldn't really be storing any measures, it would be simply storing the assignment for that year
What're some of the other possible solutions and pros / cons / correctness of each approach?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于初学者来说,我认为这样就可以了。
dimRole
可能看起来像这样For starters, this would do -- I think.
dimRole
may look something like