表之间的关系
我有一个名为目标的表,每个目标与其他目标有零到多个因果关系,这些关系我必须存储在数据库中,让我知道是否有办法关联这个表记录。
I have a table called objectives, each objective has zero to many cause-effect relationships with other objectives, these relationships I have to be stored in the database, let me know if there's a way to relate this table records.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有一种方法可以在不创建附加表的情况下关联记录(您需要在当前表上添加 N-1 列来对某个原因的 N 个可能的影响进行建模)。
创建一个如下所示的附加表应该可以满足您的目的。
应用适用的 FKey 行为。
There is not a way to relate the records without creating an additional table (you would need N-1 additional columns on your current table to model the N possible effects of a cause).
Creating an additional table like the one below should serve your purpose.
Apply FKey behaviour as applies.