database 显示主要:Visio 数据库图表中的外键关系
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12038851/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Display primary : foreign key relationships in Visio database diagram
提问by hurleystylee
I've created a Database Model relationship diagram in Visio with tables and relationships. However, I can't find any way to automatically display the Primary Key :: Foreign Key relationship in the diagram. The only workaround I can find is to insert a text box on top of the relationship and manually type it in (see image). Or you can kinda do the same by naming the relationship and displaying that. However, both of these are very manual and time-consuming. Plus I've already defined the relationship, so why should I have to type it in again!?
我在 Visio 中创建了一个包含表和关系的数据库模型关系图。但是,我找不到任何方法来自动显示图中的 Primary Key::Foreign Key 关系。我能找到的唯一解决方法是在关系顶部插入一个文本框并手动输入(见图)。或者你可以通过命名关系并显示它来做同样的事情。但是,这两者都非常手动且耗时。另外我已经定义了关系,为什么我还要再次输入它!?


回答by Allen
I realize that this post is old, but just in case you have not found an answer: http://office.microsoft.com/en-us/visio-help/define-a-relationship-in-a-database-model-diagram-HA010115484.aspx#BM4(Section Show relationships and their properties in a diagram).
我意识到这篇文章很旧,但以防万一你还没有找到答案:http: //office.microsoft.com/en-us/visio-help/define-a-relationship-in-a-database-model -diagram-HA010115484.aspx#BM4(在图表中显示关系及其属性部分)。
Hope this helps!
希望这可以帮助!
回答by Branko Dimitrijevic
As far as I know, what is in ER modeling known as "role" cannot be automatically displayed on the relationship line. However, foreign keys should be marked automatically in the child table, provided the parent and child fields are properly connected in the relationship's definition:
据我所知,ER建模中所谓的“角色”是不能自动显示在关系线上的。但是,外键应该在子表中自动标记,前提是父字段和子字段在关系定义中正确连接:



