一个真实的生产场景.背景:6个表:基金,账户,期间,期限,持有,头寸.
Fund: The fund information, for example: fund name, total Asset, start time.. etc.
Account: each fund has an account (one to one) to fund.
period: time period ( for example: 2000-01-01 to 2000-12-31)
periodweight: at a certain period, the target holding weight.
holding: IBM, Oracle, GE are stock holdings.
position: IBM($3000), oracle($2000), GE($5000)
Run Code Online (Sandbox Code Playgroud)
如果我有一个基金名称:假基金,其目标持有IBM(30%),甲骨文(20%),通用电气(50%)期间(2000-01-01至2000-12-31), 2000-01-01的实际位置是10%,10%,%80%,2000-01-02是20%,20%,60%将代表这些记录在表中
Account: id account_Number Fund_id
* 1 0001 10
2 0002 11
Fund: id name other properties...
* 10 fake fund xxx
11 another fake …Run Code Online (Sandbox Code Playgroud) hibernate ×1