如何映射大数据集中“现实生活”中的关系设想
对于与性能相关的测试,我尝试创建大量数据(250k、500k、1mill 记录)并将其插入数据库,同时模拟“现实生活”场景。
我想知道是否有研究/有人知道如何最好地模拟数据关系的现实场景。例如,如果我有 X 个不同的类,其中有多少会引用其他类。
我唯一不确定的是如何模拟关系(继承、引用等)。
提前致谢,本。
For performance related tests, I'm trying to create a large amount of data (250k,500k,1mill records) and insert it into a DB, while emulating a "real-life" scenario.
I was wondering if there were studies/anyone knows how to best emulate a real-life scenario of data-relations. For example, if I had X amount of different classes, how many of them would be referencing other classes.
The only thing I'm not sure about is how to emulate the relations (inheritence,reference, etc).
Thanks in advanced, Ben.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
一对多关系通常由“多”方的列来实现,该列标识“一”方。
多对多关系通常由一个单独的表来实现,该表标识父子对。
根据您的问题,您可能正在处理后一种情况。
one-to-many relationship is usually implemented by a column on the "many" side, which identifies the "one" side.
many-to-many relationship is usually implemented by a separate table which identifies pairs of parent-child.
Based on your question, you're probably dealing with the latter case.