我有以下结构,我想将其转换为表( RDBMS )。
1)
Structure(
// 1st entry
"HK"
Structure(
"Aggressive Price", 100
"Passive Price", 90,
"Quantity", 1000
"Tick Ladder", [ [ 0.1, 1 ],
[ 0.2, 2 ],
[ 0.3, 3 ]
]
),
//2nd entry
"JP",
Structure(
"Aggressive Price", 100
"Passive Price", 90,
"Quantity", 1000
"Tick Ladder", [ [ 0.1, 1 ],
[ 0.2, 2 ],
[ 0.3, 3 ]
],
Aggressive limits, Structure( "ABC", 10, "SCD", 20 )
)
)
2)
Structure(
// 1st entry
"Algo1"
Structure(
"Aggressive Price", 100
"Passive Price", 90,
"Quantity", 1000
"Tick Ladder", [ [ 0.1, 1 ],
[ 0.2, 2 ],
[ 0.3, 3 ]
]
),
//Second entry
"JP",
Structure(
"Aggressive Price", 100
"Passive Price", 90,
"Quantity", 1000
"Tick Ladder", [ [ 0.1, 1 ],
[ 0.2, 2 ],
[ 0.3, 3 ]
],
Aggressive limits, Structure( "ABC", 10, "SCD", 20 )
)
)
Structure(
// 1st entry
"Algo2"
Structure(
"Aggressive Price", 100
"Passive Price", 90,
"Quantity", 1000
"Tick Ladder", [ [ 0.1, 1 ],
[ 0.2, 2 ],
[ 0.3, 3 ]
]
),
//Second entry
"JP",
Structure(
"Aggressive Price", 100
"Passive Price", 90,
"Quantity", 1000
"Tick Ladder", [ [ 0.1, 1 ],
[ 0.2, 2 ],
[ 0.3, 3 ]
],
Aggressive limits, Structure( "ABC", 10, "SCD", 20 )
)
)
1) -- 包含国家“HK”和“JP”的参数。
2) -- 包含“Algo1”和“Algo2”的相同参数。参数的值可以变化。将其表示为关系模式的最佳方式是什么。
我正在考虑的解决方案
1) 带有激进价格、被动价格、数量、刻度阶梯的“参数”表
2)引用表参数的表“国家”
3) 引用表参数的表“算法”
4) 一个表“梯形图”,用于存储将由“参数”数组引用的梯形图值。
如何为引用“参数”等的“国家”表生成唯一键?
还有其他更好的方法吗?