我参加了 DBM/BI 证书课程(更像是速成课程),我决定开始一个独立的项目来实时实施我正在学习的所有内容。长话短说,我将分析过去 13 年中票房最高的 130 部电影的数据 (boxofficemojo.com)(使用 MySQL 服务器/工作台。)。首先,我想绘制一个模式,然后进行一些数据挖掘/可视化。以下是我到目前为止的拆分方式:
"Movies"
Movie_ID (Primary )
Dom_Revenue
Int_Revenue
OpWe_Revenue
Budget
"Rating"
Rating_ID (P)
Rating
"Release"
Release_ID (P)
Year
Month
Day
Movie_ID (F)
"Cast"
Director_Gender (P)
Lead_Gender (P)
Director_Name
Director_Name
Movie_ID (F)
"Studio"
Studio_ID (P)
Studio_Name
到目前为止,这些是我的关系:
rating to movies - one to many ( many movies can be rated R , a movie can only have 1 rating )
release to movies - one to many ( many movies can be released on the same weekend, a movie can only be released once)
cast to movies - one to many (directors/actors can make many movies, a movie can only have one cast)
studio to movies - many to many (movies can be attached to more than one studio, a studio can make more than one movie)
我知道架构很可能不是 100% 正确,所以我应该将所有其他表中的主键作为外键包含在“电影”表中吗?我的人际关系怎么样?
提前致谢